need to use credentials: include to make tile access cookie work

This commit is contained in:
Laura Klünder 2023-12-08 01:12:18 +01:00
parent 653117fcb7
commit 24e80014b8

View file

@ -6,7 +6,7 @@
constructor(base ) {
this.base = base;
this.auth_promise = fetch(this.base+'auth/session/', {
credentials: 'same-origin',
credentials: 'include',
method: 'GET',
})
.then(res => res.json())
@ -33,7 +33,7 @@
get(path) {
return fetch(this.make_url(path), {
credentials: 'same-origin',
credentials: 'include',
method: 'GET',
headers: {
'X-API-Key': this.key,
@ -45,7 +45,7 @@
async post(path, data) {
return fetch(this.make_url(path), {
credentials: 'same-origin',
credentials: 'include',
method: 'POST',
headers: {
'X-API-Key': this.key,