diff --git a/src/lib/request.ts b/src/lib/request.ts index cfaab76..39ff678 100644 --- a/src/lib/request.ts +++ b/src/lib/request.ts @@ -107,6 +107,9 @@ export default function request( req.proxy = { host: proxyUrl.hostname }; + if (/^https:/.test(url)) { + req.proxy.protocol = 'https'; + } if (proxyUrl.port) { req.proxy.port = Number(proxyUrl.port); }