mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #3600 from overleaf/ae-credentials-same-origin
Explicitly set credentials: same-origin on fetch requests GitOrigin-RevId: 17204554f560e2a04b35c631f571fd73f91efadd
This commit is contained in:
@@ -23,7 +23,13 @@ export function deleteJSON(path, options) {
|
||||
|
||||
function fetchJSON(
|
||||
path,
|
||||
{ body = {}, headers = {}, method = 'GET', ...otherOptions }
|
||||
{
|
||||
body = {},
|
||||
headers = {},
|
||||
method = 'GET',
|
||||
credentials = 'same-origin',
|
||||
...otherOptions
|
||||
}
|
||||
) {
|
||||
const options = {
|
||||
...otherOptions,
|
||||
@@ -33,6 +39,7 @@ function fetchJSON(
|
||||
'X-Csrf-Token': window.csrfToken,
|
||||
Accept: 'application/json'
|
||||
},
|
||||
credentials,
|
||||
method
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user