From 6a4f13de27e2c46b6e516a01ba77fd4fe03d9dbe Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 14 Jan 2016 15:04:38 +0100 Subject: [PATCH] Added docs about configuring CSRF support in AngularJS. --- docs/ref/csrf.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index a423b77f7a..6410b9eef0 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -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 ----------------------