Merge pull request #4128 from monomichael/master
Make Axios automatically send `X-CSRF-TOKEN` in the header
This commit is contained in:
commit
7a44ebefe3
|
@ -28,6 +28,7 @@ window.Vue = require('vue');
|
|||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common = {
|
||||
'X-CSRF-TOKEN': window.Laravel.csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue