#26181: Documentation: AJAX, CSRF and Angular
-------------------------------+---------------------------
     Reporter:  jliendo        |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Documentation  |    Version:  1.9
     Severity:  Normal         |   Keywords:  CSRF, angular
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  1              |      UI/UX:  0
-------------------------------+---------------------------
 On

 [https://docs.djangoproject.com/en/1.9/ref/csrf/#ajax], it says:

 If you’re using AngularJS 1.1.3 and newer, it’s sufficient to configure
 the $http provider with the cookie and header names:


 {{{
 $http.defaults.xsrfCookieName = 'csrftoken';
 $http.defaults.xsrfHeaderName = 'X-CSRFToken';
 }}}

 I think that it should read,


 {{{
 $httpProvider.defaults.xsrfCookieName = 'csrftoken';
 $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
 }}}


 On angular HTTP default headers are defined on the $httpProvider object.

--
Ticket URL: <https://code.djangoproject.com/ticket/26181>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.c2b58c5d3d65810de80e309f109f6e1c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to