diff --git a/src/c3nav/static/c3nav/js/api.js b/src/c3nav/static/c3nav/js/api.js index 52163114..97bc73e6 100644 --- a/src/c3nav/static/c3nav/js/api.js +++ b/src/c3nav/static/c3nav/js/api.js @@ -33,7 +33,7 @@ get(path) { return fetch(this.make_url(path), { - credentials: 'omit', + credentials: 'same-origin', method: 'GET', headers: { 'X-API-Key': this.key, @@ -45,10 +45,10 @@ async post(path, data) { return fetch(this.make_url(path), { - credentials: 'omit', + credentials: 'same-origin', method: 'POST', headers: { - 'Authorization': `Bearer ${this.key}`, + 'X-API-Key': this.key, 'Accept': 'application/json', 'Content-Type': 'application/json', },