From eeda9fb56806111db2fde29c6facfd027b8373dd Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Thu, 18 Jul 2024 16:06:45 -0700 Subject: [PATCH] close #409 --- src/gui/src/helpers.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/src/helpers.js b/src/gui/src/helpers.js index 394bcc65..a85be51b 100644 --- a/src/gui/src/helpers.js +++ b/src/gui/src/helpers.js @@ -1169,7 +1169,13 @@ window.trigger_download = (paths)=>{ urls.forEach(async function (e) { const anti_csrf = await (async () => { - const resp = await fetch(`${window.gui_origin}/get-anticsrf-token`); + const resp = await fetch( + `${window.gui_origin}/get-anticsrf-token`,{ + headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ' + window.auth_token, + } + },) const { token } = await resp.json(); return token; })();