Make axios automatically send the `X-CSRF-TOKEN`
This commit is contained in:
parent
d0c5c041f2
commit
0cdcc779bf
|
@ -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