Skip to content

Commit

Permalink
Set proxy protocol for https requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jason0x43 committed Jan 23, 2020
1 parent 7a44e90 commit d11b8b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export default function request(
req.proxy = <AxiosProxyConfig>{
host: proxyUrl.hostname
};
if (/^https:/.test(url)) {
req.proxy.protocol = 'https';
}
if (proxyUrl.port) {
req.proxy.port = Number(proxyUrl.port);
}
Expand Down

0 comments on commit d11b8b2

Please sign in to comment.