diff --git a/frontend/src/services/http-client/http-client.js b/frontend/src/services/http-client/http-client.js index 6ba2341f0..4ea725d2f 100644 --- a/frontend/src/services/http-client/http-client.js +++ b/frontend/src/services/http-client/http-client.js @@ -1,3 +1,5 @@ +import Cookies from 'js-cookie'; + export class HttpClient { static ACCEPT = { @@ -20,6 +22,8 @@ export class HttpClient { post(args) { args.method = 'POST'; + args.headers = args.headers || {}; + args.headers['X-XSRF-TOKEN'] = Cookies.get('XSRF-TOKEN'); return this._fetch(args); }