Showing posts with label AJAX To Send CSRF Token Authenticity. Show all posts
Showing posts with label AJAX To Send CSRF Token Authenticity. Show all posts

Friday, November 27, 2015

AJAX To Send CSRF Token Authenticity

AJAX To Send CSRF Token Authenticity

To send CSRF (XSRF) token authenticity in all AJAX requests:

$.ajaxSetup({
     headers: { 
 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content') 
 }});