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:
Wayne Harris 2016-09-22 10:36:43 +01:00
parent 4eeec60d7a
commit 76db1006cc
2 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,6 @@
"laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.14.0",
"vue": "^1.0.26",
"vue-resource": "^0.9.3"
"vue-resource": "^1.0.2"
}
}

View File

@ -26,7 +26,7 @@ require('vue-resource');
*/
Vue.http.interceptors.push((request, next) => {
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
next();
});