Skip to content

Commit c6e3d6e

Browse files
authored
Merge pull request laravel#4208 from misenhower/fix-axios-defaults
Add to axios defaults instead of overwriting them
2 parents f7b9a59 + 0d31e29 commit c6e3d6e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

resources/assets/js/bootstrap.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ window.Vue = require('vue');
2727

2828
window.axios = require('axios');
2929

30-
window.axios.defaults.headers.common = {
31-
'X-CSRF-TOKEN': window.Laravel.csrfToken,
32-
'X-Requested-With': 'XMLHttpRequest'
33-
};
30+
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken;
31+
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
3432

3533
/**
3634
* Echo exposes an expressive API for subscribing to channels and listening

0 commit comments

Comments
 (0)