diff --git a/services/web/frontend/js/infrastructure/fetch-json.js b/services/web/frontend/js/infrastructure/fetch-json.js index ecd873bf34..f9d78657a4 100644 --- a/services/web/frontend/js/infrastructure/fetch-json.js +++ b/services/web/frontend/js/infrastructure/fetch-json.js @@ -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 }