luminus-framework / luminus

documentation site for Luminus framework
http://www.luminusweb.net/
629 stars 121 forks source link

A bit outdated documentation on Ring middleware? #272

Open nfedyashev opened 4 years ago

nfedyashev commented 4 years ago

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 commented 4 years ago

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.

yogthos commented 4 years ago

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