Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created February 14, 2012 23:00
Show Gist options
  • Save mxriverlynn/1831406 to your computer and use it in GitHub Desktop.
Save mxriverlynn/1831406 to your computer and use it in GitHub Desktop.
$.ajaxSetup({
beforeSend: function(xhr) {
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment