luminus
luminus copied to clipboard
A bit outdated documentation on Ring middleware?
https://luminusweb.com/docs/routes.html
We can now wrap the route groups we wish to be private using the wrap-restricted middleware in the
.handler/app function: (def app (-> (routes (-> home-routes (wrap-routes middleware/wrap-csrf) (wrap-routes middleware/wrap-restricted)) base-routes) middleware/wrap-base))
I might be wrong but at first sight it looks like Compojure was used as a dependency at some point in Luminus. This is where the wrap-routes
function is from.
- update, I could solve it using
wrap-access-rules
from buddy.auth.accessrules.
I'll try to find some time a bit later to come up with a pull request to update resources/md/routes.md
if @yogthos can confirm that this is now the recommended way to do it.
Oh yeah that's a leftover from Compojure, and a PR would be very welcome if you get a chance.