My function looks like this:
testFunctionAuth() {
const promise = new Promise((resolve, reject) => {
this.http.get(AppConfigService.settings.apiServer.rest + 'systems/all', { headers: { 'Authorization': 'Bearer eyJ...rxbwcO-w' } })
.subscribe(res => {
resolve(res);
},
err => {
console.error(err);
reject(undefined);
});
});
}
But I get a 401 back and in the Header, the Auth token is even missing:
What is also strange is that Firefox says the Method is OPTIONS and not GET. Why?