new version

This commit is contained in:
UrloMythus
2026-01-11 14:29:22 +01:00
parent b8a40b5afc
commit 7785e8c604
45 changed files with 5463 additions and 832 deletions

View File

@@ -425,12 +425,14 @@ class MediaFlowSpeedTest {
'Content-Type': 'application/json',
};
// Add current API password to headers if provided
// Build URL with api_password as query parameter if provided
// This is more reliable than headers when behind reverse proxies
let configUrl = '/speedtest/config';
if (currentApiPassword) {
headers['api_password'] = currentApiPassword;
configUrl += `?api_password=${encodeURIComponent(currentApiPassword)}`;
}
const response = await fetch('/speedtest/config', {
const response = await fetch(configUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(requestBody)