add credentials same-origin
This commit is contained in:
parent
17887c05fd
commit
b6c741fd05
1 changed files with 1 additions and 0 deletions
|
@ -38,6 +38,7 @@ async function api(url, data) {
|
||||||
var csrf = getCSRF()
|
var csrf = getCSRF()
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
credentials: 'same-origin',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-CSRFToken': csrf
|
'X-CSRFToken': csrf
|
||||||
|
|
Loading…
Reference in a new issue