2

I'm using javascript with a Django api to submit a modal form.

I'm sending a CSRF cookie that works in other circumstances (like on other browsers or with other forms in Chrome), but when I submit a Django form, but it fails on chrome and I get the following error:

Error:
Forbidden (403) CSRF verification failed.
Request aborted.
Reason given for failure: CSRF token missing or incorrect.

I know for a fact that I'm sending the CSRF cookie, as I can see it in the inspect element.

csrfmiddlewaretoken=*sometoken*

How might I fix this and what other information do you need?

user10421193
  • 217
  • 2
  • 11
  • I think this can help you [check here](https://stackoverflow.com/questions/4547639/django-csrf-verification-failed) – Ashish Feb 19 '20 at 04:56

0 Answers0