[1.9.x] Added docs about configuring CSRF support in AngularJS.
Backport of 6a4f13de27e2c46b6e516a01ba77fd4fe03d9dbe from master
This commit is contained in:
parent
7ebe378f36
commit
577ec6fcd1
@ -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…
x
Reference in New Issue
Block a user