summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Bargen <mail@dbrgn.ch>2016-01-14 15:04:38 +0100
committerTim Graham <timograham@gmail.com>2016-01-15 10:16:57 -0500
commit577ec6fcd10b15789eb9cbd61531fbd2010b042d (patch)
tree88803b73d068814b44d211027575efb30ef85db5
parent7ebe378f363cf28b3d1ec9b0b27fd8d2ab78aead (diff)
[1.9.x] Added docs about configuring CSRF support in AngularJS.
Backport of 6a4f13de27e2c46b6e516a01ba77fd4fe03d9dbe from master
-rw-r--r--docs/ref/csrf.txt8
1 files changed, 8 insertions, 0 deletions
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
----------------------