Make axios automatically send the `X-CSRF-TOKEN`

This commit is contained in:
Michael Zhang 2017-01-30 12:07:53 -05:00
parent d0c5c041f2
commit 0cdcc779bf
1 changed files with 1 additions and 0 deletions

View File

@ -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'
};