Add csrf token header axios

This commit is contained in:
Michael Götz 2018-04-04 20:28:33 +02:00
parent cae894dfdd
commit 586ae29549

View File

@ -54,6 +54,8 @@ if (Auth.authenticated()) {
};
console.log(window.axios.defaults.headers.common)
}
axios.defaults.xsrfCookieName = 'csrftoken';
axios.defaults.xsrfHeaderName = 'HTTP_X_CSRFTOKEN';
/* eslint-disable no-new */
new Vue({