From 796b844cb3492cf6ed0615ea99d02fcc18789eab Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 27 Oct 2020 11:05:42 +0100 Subject: [PATCH] chore(docs): more docs around proxy setup --- .../docs/tutorials/help-im-behind-a-corporate-proxy.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/docs/tutorials/help-im-behind-a-corporate-proxy.md b/contrib/docs/tutorials/help-im-behind-a-corporate-proxy.md index d02fa4b510..4f8351ac15 100644 --- a/contrib/docs/tutorials/help-im-behind-a-corporate-proxy.md +++ b/contrib/docs/tutorials/help-im-behind-a-corporate-proxy.md @@ -42,9 +42,16 @@ import ProxyAgent from 'proxy-agent'; import http from 'http'; import https from 'https'; +/* + Something to note here, this might need different configuration depending on your own setup. + If you only have an http_proxy then you'll need to set that as both the http and https globalAgent instead. +*/ if (process.env.HTTP_PROXY) { http.globalAgent = new ProxyAgent(process.env.HTTP_PROXY); - https.globalAgent = new ProxyAgent(process.env.HTTP_PROXY); +} + +if (process.env.HTTPS_PROXY) { + https.globalAgent = new ProxyAgent(process.env.HTTPS_PROXY); } ```