feat: HTTP + HTTPS proxy support (#139)

Co-authored-by: Hiroki Osame <hiroki.osame@gmail.com>
This commit is contained in:
Sam Büth
2023-03-27 08:51:51 +02:00
committed by GitHub
parent 6e02dc8f81
commit a0db0f3ece
7 changed files with 77 additions and 17 deletions

View File

@@ -51,6 +51,15 @@ const configParsers = {
return parsed;
},
proxy(url?: string) {
if (!url || url.length === 0) {
return undefined;
}
parseAssert('proxy', /^https?:\/\//.test(url), 'Must be a valid URL');
return url;
},
} as const;
type ConfigKeys = keyof typeof configParsers;