mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Add to axios defaults instead of overwriting them
This change ensures the default "Accept" header specified by axios is retained.
This commit is contained in:
parent
f7b9a590f9
commit
0d31e2993b
6
resources/assets/js/bootstrap.js
vendored
6
resources/assets/js/bootstrap.js
vendored
@ -27,10 +27,8 @@ window.Vue = require('vue');
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common = {
|
||||
'X-CSRF-TOKEN': window.Laravel.csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken;
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
|
Loading…
x
Reference in New Issue
Block a user