luminus icon indicating copy to clipboard operation
luminus copied to clipboard

A bit outdated documentation on Ring middleware?

Open nfedyashev opened this issue 4 years ago • 2 comments

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.

nfedyashev avatar Jul 18 '20 22:07 nfedyashev

  • 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.

nfedyashev avatar Jul 18 '20 22:07 nfedyashev

Oh yeah that's a leftover from Compojure, and a PR would be very welcome if you get a chance.

yogthos avatar Jul 18 '20 22:07 yogthos