Explorar o código

Added docs about configuring CSRF support in AngularJS.

Danilo Bargen %!s(int64=9) %!d(string=hai) anos
pai
achega
6a4f13de27
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      docs/ref/csrf.txt

+ 8 - 0
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
 ----------------------