Skip to content

Instantly share code, notes, and snippets.

@1990prashant
Created March 16, 2016 06:21
Show Gist options
  • Save 1990prashant/031bd1efc614b4253f33 to your computer and use it in GitHub Desktop.
Save 1990prashant/031bd1efc614b4253f33 to your computer and use it in GitHub Desktop.
To provide app token globally in javascript
$.ajaxSetup({
headers: {
'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