Update Vue Resource
Propose updating Vue Resource. Will require changing the way the X-CSRF-TOKEN header in bootstrap.js This seems to be compatible with Larval Passport
This commit is contained in:
parent
4eeec60d7a
commit
76db1006cc
|
@ -13,6 +13,6 @@
|
||||||
"laravel-elixir-webpack-official": "^1.0.2",
|
"laravel-elixir-webpack-official": "^1.0.2",
|
||||||
"lodash": "^4.14.0",
|
"lodash": "^4.14.0",
|
||||||
"vue": "^1.0.26",
|
"vue": "^1.0.26",
|
||||||
"vue-resource": "^0.9.3"
|
"vue-resource": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ require('vue-resource');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Vue.http.interceptors.push((request, next) => {
|
Vue.http.interceptors.push((request, next) => {
|
||||||
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
|
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
|
||||||
|
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue