Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bit outdated documentation on Ring middleware? #272

Open
nfedyashev opened this issue Jul 18, 2020 · 2 comments
Open

A bit outdated documentation on Ring middleware? #272

nfedyashev opened this issue Jul 18, 2020 · 2 comments

Comments

@nfedyashev
Copy link
Contributor

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
Copy link
Contributor Author

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

@yogthos
Copy link
Member

yogthos commented Jul 18, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants