diff options
| author | Haishan <[email protected]> | 2022-05-27 19:03:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-27 19:03:04 +0800 |
| commit | e4e06319224ae52d0ed9e4cd0a93608e6e71ea4e (patch) | |
| tree | 5ddb24eda244d8624d434d8d7e248cc157a58dde /src/api | |
| parent | 7c023029cb218a303dec53921d465f106a37d386 (diff) | |
| parent | d0787a640de80af3d8005c4a23a09f8dd296698a (diff) | |
Merge pull request #700 from AoEiuV020/patch-1
fix: encode URI for latencyTestUrl
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/proxies.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/proxies.ts b/src/api/proxies.ts index ce3266e..6b3e28e 100644 --- a/src/api/proxies.ts +++ b/src/api/proxies.ts @@ -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); } |
