BlueGit

timfa filemanager

fix: include fingerprint header for sidebar zip downloads

timfa Tim Falken · pushed by timfa

Authored 2026-05-06 · 6 months ago

Hash
d0af36bcae9b495a46842b4029b6c7bf0b721e20
Parent
09b0cba1
1 file changed +4 −2
public/app.js +4 −2
@@ -1322,8 +1322,10 @@ async function openSidebar (item)
1322 1322 btnZip.disabled = true;
1323 1323 btnZip.textContent = 'Bezig…';
1324 1324 const url = `/api/files/download-zip?dir=${encodeURIComponent(item.path)}`;
1325 const headers = { 'Content-Type': 'application/json' };
1326 if (STATE.token) headers['Authorization'] = 'Bearer ' + STATE.token;
1325 const headers = {
1326 Authorization: 'Bearer ' + STATE.token,
1327 'X-Fp': getFingerprint(),
1328 };
1327 1329 fetch(url, { headers })
1328 1330 .then(res =>
1329 1331 {
@@ -1322,8 +1322,10 @@ async function openSidebar (item)
1322 btnZip.disabled = true;
1322 btnZip.disabled = true;
1323 btnZip.textContent = 'Bezig…';
1323 btnZip.textContent = 'Bezig…';
1324 const url = `/api/files/download-zip?dir=${encodeURIComponent(item.path)}`;
1324 const url = `/api/files/download-zip?dir=${encodeURIComponent(item.path)}`;
1325 const headers = { 'Content-Type': 'application/json' };
1325 const headers = {
1326 if (STATE.token) headers['Authorization'] = 'Bearer ' + STATE.token;
1326 Authorization: 'Bearer ' + STATE.token,
1327 'X-Fp': getFingerprint(),
1328 };
1327 fetch(url, { headers })
1329 fetch(url, { headers })
1328 .then(res =>
1330 .then(res =>
1329 {
1331 {