1
0
Fork 0

Formatting

pull/1439/head
Ferenc Hammerl 2023-06-20 13:55:00 +00:00
parent 17e0aec811
commit 60f4e9859c
1 changed files with 2 additions and 3 deletions

View File

@ -16,10 +16,9 @@ export function getProxyUrl(reqUrl: URL): URL | undefined {
if (proxyVar) { if (proxyVar) {
try { try {
return new URL(proxyVar) return new URL(proxyVar)
} } catch {
catch {
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
return new URL('http://' + proxyVar) return new URL('http://' + proxyVar)
} }
} else { } else {
return undefined return undefined