mirror of
https://github.com/django/django.git
synced 2025-01-05 07:55:47 +00:00
Added docs about configuring CSRF support in AngularJS.
This commit is contained in:
parent
3486311a42
commit
6a4f13de27
@ -139,6 +139,14 @@ newer:
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
If you're using AngularJS 1.1.3 and newer, it's sufficient to configure the
|
||||||
|
``$http`` provider with the cookie and header names:
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
$http.defaults.xsrfCookieName = 'csrftoken';
|
||||||
|
$http.defaults.xsrfHeaderName = 'X-CSRFToken';
|
||||||
|
|
||||||
Other template engines
|
Other template engines
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user