From 1a30daee89364bf411e2f04dec2bfaa2aa9f312f Mon Sep 17 00:00:00 2001 From: Chris Suszynski Date: Mon, 17 Apr 2023 15:19:04 +0200 Subject: [PATCH] Check lower-cased proxy settings as well --- lib/HttpClient.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/HttpClient.ts b/lib/HttpClient.ts index ed6bc599..d35f3428 100644 --- a/lib/HttpClient.ts +++ b/lib/HttpClient.ts @@ -125,7 +125,10 @@ export class HttpClient implements ifm.IHttpClient { constructor(userAgent: string | null | undefined, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions) { this.userAgent = userAgent; this.handlers = handlers || []; - let no_proxy: string = process.env[EnvironmentVariables.NO_PROXY]; + let no_proxy: string = process.env[EnvironmentVariables.NO_PROXY] + if (!no_proxy) { + no_proxy = process.env[EnvironmentVariables.NO_PROXY.toLowerCase()]; + } if (no_proxy) { this._httpProxyBypassHosts = []; no_proxy.split(',').forEach(bypass => { @@ -552,7 +555,13 @@ export class HttpClient implements ifm.IHttpClient { // fallback to http_proxy and https_proxy env let https_proxy: string = process.env[EnvironmentVariables.HTTPS_PROXY]; + if (!https_proxy) { + https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY.toLowerCase()]; + } let http_proxy: string = process.env[EnvironmentVariables.HTTP_PROXY]; + if (!http_proxy) { + http_proxy = process.env[EnvironmentVariables.HTTP_PROXY.toLowerCase()]; + } if (!proxyConfig) { if (https_proxy && usingSsl) {