소스 검색

Added docs about configuring CSRF support in AngularJS.

Danilo Bargen 9 년 전
부모
커밋
6a4f13de27
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  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
 ----------------------