fix: encode URI for latencyTestUrl
fixes #699 Illegal url splicing may lead to misjudgment of ad block,
This commit is contained in:
parent
7c023029cb
commit
d0787a640d
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