From 4a90cf1b1060fbb3dca0b2700cd9739f3896c613 Mon Sep 17 00:00:00 2001 From: Eros Zhao Date: Mon, 11 Dec 2023 11:27:37 +0000 Subject: [PATCH 1/2] feat: add httpsAgent for proxy keepalive on https request --- lib/http_proxy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/http_proxy.js b/lib/http_proxy.js index b25746e..1011e1e 100644 --- a/lib/http_proxy.js +++ b/lib/http_proxy.js @@ -32,6 +32,7 @@ class HttpProxy { const defaultOptions = { timeout: this.config.timeout, agent: this.config.agent, + httpsAgent: this.config.agent, streaming: true, followRedirect: false, beforeResponse: undefined, From 5dd6a838ea897a18170235b643b82527ffea5a07 Mon Sep 17 00:00:00 2001 From: Eros Zhao Date: Mon, 11 Dec 2023 12:28:31 +0000 Subject: [PATCH 2/2] fix: use httpsAgent instead of config.agent --- lib/http_proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http_proxy.js b/lib/http_proxy.js index 1011e1e..f3b9daf 100644 --- a/lib/http_proxy.js +++ b/lib/http_proxy.js @@ -32,7 +32,7 @@ class HttpProxy { const defaultOptions = { timeout: this.config.timeout, agent: this.config.agent, - httpsAgent: this.config.agent, + httpsAgent: this.config.httpsAgent, streaming: true, followRedirect: false, beforeResponse: undefined,