-
Notifications
You must be signed in to change notification settings - Fork 1
protecting routes /Post #5
Description
This is again not an issue just a request for clarification and/or a feature request :)
I am using ExpressSwift for a traditional CMS so we have an admin area where the admin can add/delete/edit pages.
So I faced two issues: one is proecting the routes and the second is limiting post requests to a certain user (or IP).
My workaround is not very elegant: I couldn't find a way to get basic auth to work with swift (e.g. https://github.com/jjb3rd/HttpBasicAuth this does not work).
So what I did is protecting the admin pages with pagecrypt. This doesn't solve the problem that if someone knows the "POST" route it can simply bypass all the protections. So as another not so elegant workaround I am restricting any post (on NGINX) to the admin IP.
In short: is there a way to protect routes e.g. with httpbasic auth or something similar?
Thanks!