Search code examples
djangocsrfdjango-csrf

Django CSRF verification failed


I have a form in http page say http://example.com and form is like .I m using django 1.3.I enabled csrf middleware and put csrf token tag inside the form.When i try to submit the form i m getting the below error.

Referer checking failed - http://example.com/ does not match https://example.com/.

Any idea on how to overcome this problem?


Solution

  • There is difference between http and https. Are you trying to POST on HTTPS while GET is from HTTP?

    If you have HTTPS setup may be you can look here for validating your configuration.