[Django]-Forbidden (403) in a post request – djangorest-react

2👍

Seems that you are not passing CSRF in your header:

Try to put it in your header:

'X-CSRFToken': csrftoken

The value if CSRF token you can get from cookies.
For more info about CSRF you can refer to Django 3.2 official docs.

Leave a comment