We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e597846 commit 0d0c76aCopy full SHA for 0d0c76a
src/lib/request/request.ts
@@ -21,6 +21,16 @@ declare const global: Global;
21
export = function makeRequest(
22
payload: Payload,
23
): Promise<{ res: needle.NeedleResponse; body: any }> {
24
+ // This ensures we support lowercase http(s)_proxy values as well
25
+ // The weird IF around it ensures we don't create an envvar with a value of undefined, which throws error when trying to use it as a proxy
26
+ if (process.env.HTTP_PROXY || process.env.http_proxy) {
27
+ process.env.HTTP_PROXY = process.env.HTTP_PROXY || process.env.http_proxy;
28
+ }
29
+ if (process.env.HTTPS_PROXY || process.env.https_proxy) {
30
+ process.env.HTTPS_PROXY =
31
+ process.env.HTTPS_PROXY || process.env.https_proxy;
32
33
+
34
return getVersion().then(
35
(versionNumber) =>
36
new Promise((resolve, reject) => {
0 commit comments