securing access for deno deploy?
We are creating a page using fresh, that is only for internal usage inside our company.
We would of course love to use deno deploy for it, but is there a good way to limit the access to both the rendered frontend and the API, maybe even with something similar to cloudflare access?
We are currently looking into a way to add a custom middleware, butaybe there are simpler solutions, or even alternative ways of hosting the page (without going through tons of infrastructure setup)?
3 Replies
I don’t know how deno deploy works, but wouldn’t a simple login system work? And for the api an API key?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
We managed to create a middleware for cloudflare access (which also uses azure in the background) using https://deno.land/x/djwt. By returning a 401 response from the middleware instead of
return ctx.next(), we can make sure nothing is accessed without it. Of course we need to also cater for developing locally without any cookie and we also want to test the cookie behaviour locally.
So for now it works for us, but in case anybody has some more ideas on the topic, I would be happy to hear about them.