mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-04-11 11:50:51 +00:00
new version
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user