need to use credentials: include to make tile access cookie work
This commit is contained in:
parent
653117fcb7
commit
24e80014b8
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
constructor(base ) {
|
constructor(base ) {
|
||||||
this.base = base;
|
this.base = base;
|
||||||
this.auth_promise = fetch(this.base+'auth/session/', {
|
this.auth_promise = fetch(this.base+'auth/session/', {
|
||||||
credentials: 'same-origin',
|
credentials: 'include',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
get(path) {
|
get(path) {
|
||||||
return fetch(this.make_url(path), {
|
return fetch(this.make_url(path), {
|
||||||
credentials: 'same-origin',
|
credentials: 'include',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'X-API-Key': this.key,
|
'X-API-Key': this.key,
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
async post(path, data) {
|
async post(path, data) {
|
||||||
return fetch(this.make_url(path), {
|
return fetch(this.make_url(path), {
|
||||||
credentials: 'same-origin',
|
credentials: 'include',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'X-API-Key': this.key,
|
'X-API-Key': this.key,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue