Skip to content

Instantly share code, notes, and snippets.

@intruxxer
Created November 26, 2013 17:19
Show Gist options
  • Save intruxxer/7662287 to your computer and use it in GitHub Desktop.
Save intruxxer/7662287 to your computer and use it in GitHub Desktop.
$(document).ajaxSend(function(e, xhr, options) {
var token = $("meta[name='csrf-token']").attr("content");
xhr.setRequestHeader("X-CSRF-Token", token);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment