Merge pull request #700 from AoEiuV020/patch-1
fix: encode URI for latencyTestUrl
This commit is contained in:
commit
e4e0631922
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ export async function requestDelayForProxy(
|
|||
latencyTestUrl = 'http://www.gstatic.com/generate_204'
|
||||
) {
|
||||
const { url, init } = getURLAndInit(apiConfig);
|
||||
const qs = `timeout=5000&url=${latencyTestUrl}`;
|
||||
const qs = `timeout=5000&url=${encodeURIComponent(latencyTestUrl)}`;
|
||||
const fullURL = `${url}${endpoint}/${encodeURIComponent(name)}/delay?${qs}`;
|
||||
return await fetch(fullURL, init);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue