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 CSRF to be entirely disabled #483

Open
marksteward opened this issue Nov 4, 2021 · 0 comments
Open

Allow CSRF to be entirely disabled #483

marksteward opened this issue Nov 4, 2021 · 0 comments

Comments

@marksteward
Copy link

Thanks to SameSite-by-default cookies, CSRF protection is pretty much redundant these days. However, if I strip out the call to CSRFProtect.init_app, Flask-WTF still generates and inserts a csrf_token field into forms, even if WTF_CSRF_ENABLED is set to False.

Would you accept a PR to make it so that a project that never calls CSRFProtect.init_app leaves csrf, csrf_class, and csrf_context as their empty defaults?

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

No branches or pull requests

2 participants