diff options
| author | shunf4 <[email protected]> | 2020-12-30 16:39:08 +0800 |
|---|---|---|
| committer | shunf4 <[email protected]> | 2020-12-30 16:39:08 +0800 |
| commit | 877291334e5949b993308da826f7c8f56eb7fe58 (patch) | |
| tree | 5ca84d226cc20c10b7095fe48aec887d324128e8 /src/api | |
| parent | c4150a4edfdd24f750c31d641540625b5e625fbf (diff) | |
fix: encode URI for node name in case it contains special chars
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 963f8be..ce3266e 100644 --- a/src/api/proxies.ts +++ b/src/api/proxies.ts @@ -37,7 +37,7 @@ export async function requestDelayForProxy( ) { const { url, init } = getURLAndInit(apiConfig); const qs = `timeout=5000&url=${latencyTestUrl}`; - const fullURL = `${url}${endpoint}/${name}/delay?${qs}`; + const fullURL = `${url}${endpoint}/${encodeURIComponent(name)}/delay?${qs}`; return await fetch(fullURL, init); } |
