Fixed #119: forced redirection to login even with API_AUTHENTICATION_REQUIRED=False

This commit is contained in:
Eliot Berriot 2018-03-15 22:34:00 +01:00
parent 0f5b1c295e
commit 4298c4236e
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
6 changed files with 14 additions and 3 deletions

View file

@ -30,6 +30,9 @@ export default {
},
apiSettings: {
beforeXHR: function (xhrObject) {
if (!self.$store.state.auth.authenticated) {
return xhrObject
}
xhrObject.setRequestHeader('Authorization', self.$store.getters['auth/header'])
return xhrObject
},