Answer the question
In order to leave comments, you need to log in
Why is CSRF-token not written to cookies?
Good afternoon!
Before that, I was sitting on a laptop with Linux, and because. sessions were not deleted, there was no problem, but yesterday I moved to my home computer and immediately got an error:
Forbidden <span>(403)</span>
CSRF verification failed. Request aborted.
Reason given for failure:
CSRF cookie not set.
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.xsrfCookieName = 'csrftoken';
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
}]);
'django.middleware.csrf.CsrfViewMiddleware'
it is also registered. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question