|
@@ -6,20 +6,7 @@ import router from './routes.js'
|
|
|
Vue.use(VueAxios, axios)
|
|
|
|
|
|
Vue.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
|
-
|
|
|
-// let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
|
-
|
|
|
-// if (token) {
|
|
|
-// Vue.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
|
-// } else {
|
|
|
-// console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
|
-// }
|
|
|
-
|
|
|
-Vue.axios.interceptors.request.use(function (request) {
|
|
|
-
|
|
|
- request.headers.common['Content-Type'] = 'application/json'
|
|
|
- return request
|
|
|
-})
|
|
|
+Vue.axios.defaults.headers.common['Content-Type'] = 'application/json'
|
|
|
|
|
|
Vue.axios.interceptors.response.use(response => response, error => {
|
|
|
|