Browse Source

Merge pull request #4128 from monomichael/master

Make Axios automatically send `X-CSRF-TOKEN` in the header
Taylor Otwell 7 years ago
parent
commit
7a44ebefe3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      resources/assets/js/bootstrap.js

+ 1 - 0
resources/assets/js/bootstrap.js

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