Merge pull request #4128 from monomichael/master

Make Axios automatically send `X-CSRF-TOKEN` in the header
This commit is contained in:
Taylor Otwell 2017-01-30 14:39:52 -06:00 committed by GitHub
commit 7a44ebefe3
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ window.Vue = require('vue');
window.axios = require('axios'); window.axios = require('axios');
window.axios.defaults.headers.common = { window.axios.defaults.headers.common = {
'X-CSRF-TOKEN': window.Laravel.csrfToken,
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest'
}; };