Skip to content

Commit f61670e

Browse files
authored
Check lower-cased proxy settings as well
1 parent 9dd700b commit f61670e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/HttpClient.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ export class HttpClient implements ifm.IHttpClient {
125125
constructor(userAgent: string | null | undefined, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions) {
126126
this.userAgent = userAgent;
127127
this.handlers = handlers || [];
128-
let no_proxy: string = process.env[EnvironmentVariables.NO_PROXY];
128+
let no_proxy: string = process.env[EnvironmentVariables.NO_PROXY] ??
129+
process.env[EnvironmentVariables.NO_PROXY.toLowerCase()];
129130
if (no_proxy) {
130131
this._httpProxyBypassHosts = [];
131132
no_proxy.split(',').forEach(bypass => {
@@ -551,8 +552,10 @@ export class HttpClient implements ifm.IHttpClient {
551552
let proxyConfig: ifm.IProxyConfiguration = this._httpProxy;
552553

553554
// fallback to http_proxy and https_proxy env
554-
let https_proxy: string = process.env[EnvironmentVariables.HTTPS_PROXY];
555-
let http_proxy: string = process.env[EnvironmentVariables.HTTP_PROXY];
555+
let https_proxy: string = process.env[EnvironmentVariables.HTTPS_PROXY] ??
556+
process.env[EnvironmentVariables.HTTPS_PROXY.toLowerCase()];
557+
let http_proxy: string = process.env[EnvironmentVariables.HTTP_PROXY] ??
558+
process.env[EnvironmentVariables.HTTP_PROXY.toLocaleLowerCase()];
556559

557560
if (!proxyConfig) {
558561
if (https_proxy && usingSsl) {

0 commit comments

Comments
 (0)