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

Allow CsrfProtect(blueprint) #144

Closed
fayazkhan opened this issue Aug 5, 2014 · 2 comments
Closed

Allow CsrfProtect(blueprint) #144

fayazkhan opened this issue Aug 5, 2014 · 2 comments

Comments

@fayazkhan
Copy link

Selectively enforcing CSRF is preferable rather than csrf.exempt(blueprint) IMO.
Is it doable? (I was looking into it and was lost at what to do with the config variables.) Does it make sense? Is #111 really the "obvious way to do it"? (I'm not Dutch)

@lepture
Copy link
Contributor

lepture commented Feb 16, 2015

With this change e85808b

You can set WTF_CSRF_CHECK_DEFAULT to False, and protect a single blueprint with:

csrf = CsrfProtect(app)

some_blueprint.before_request(csrf.protect)

@fayazkhan
Copy link
Author

That's good enough I guess.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants