feat: HTTP + HTTPS proxy support (#139)
Co-authored-by: Hiroki Osame <hiroki.osame@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user