I
I
Ivan2016-02-11 21:48:13
Django
Ivan, 2016-02-11 21:48:13

Django + Angular not setting token?

Good day. I uploaded the project to the hosting, but when submitting forms, the CSRF-Token is not installed.
the following is written in the angular .config

.config(['$httpProvider', '$interpolateProvider',function($httpProvider, $interpolateProvider) {
        $httpProvider.defaults.xsrfCookieName = 'csrftoken';
        $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';

Everything works fine on the local server. Help me please. Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question