Django csrf verification failed despite all tokens being present

19 Views Asked by At

I have a django website with forms. It works fine in debug mode on localhost but when a form is posted on a real server I get an csrf verification failed error. The form contains a csrf middleware token generated by {%csrf_token%} and the csrf token from the cookie is also sent with the request. The form is sent from subdomain.example.com/path to the same address. How can I fix this error?

0

There are 0 best solutions below