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

Add support for CSRF protection #30

Closed
bobisjan opened this issue Jun 1, 2015 · 0 comments
Closed

Add support for CSRF protection #30

bobisjan opened this issue Jun 1, 2015 · 0 comments

Comments

@bobisjan
Copy link
Owner

bobisjan commented Jun 1, 2015

A generated CSRF token will be passed into a meta tag, like this:

<meta name="X-CSRFToken" content="fjksdnf43534kjnrjkdn">

This feature will be enabled by presence of django.middleware.csrf.CsrfViewMiddleware in settings.MIDDLEWARE_CLASSES and the settings.CSRF_HEADER_NAME X-CSRFToken will be used for the name attribute.

Support for settings.CSRF_HEADER_NAME will be added with release of Django 1.9.

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

No branches or pull requests

1 participant