Merge pull request #4208 from misenhower/fix-axios-defaults
Add to axios defaults instead of overwriting them
This commit is contained in:
commit
c6e3d6e5b4
|
@ -27,10 +27,8 @@ 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-CSRF-TOKEN': window.Laravel.csrfToken,
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Echo exposes an expressive API for subscribing to channels and listening
|
* Echo exposes an expressive API for subscribing to channels and listening
|
||||||
|
|
Loading…
Reference in New Issue