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()
|
||||
return fetch(url, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrf
|
||||
|
|
Loading…
Reference in a new issue