From 6588dcf2fdc97e7f62d80fa4f5ab56586b6fb996 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Wed, 23 Oct 2024 17:30:27 +0200 Subject: [PATCH] Fixes Issue #3233: set httpsAgentRequestFields on request.httpsAgent when shouldProxy or shouldUseSystemProxy was false (#3317) * fix: set httpsAgentRequestFields on request.httpsAgent when shouldProxy is false * fix: set httpsAgentRequestFields on request.httpsAgent when shouldUseSystemProxy is false --- packages/bruno-electron/src/ipc/network/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 97e3b8557..d08867289 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -233,6 +233,10 @@ const configureRequest = async ( ); request.httpAgent = new HttpProxyAgent(proxyUri); } + } else { + request.httpsAgent = new https.Agent({ + ...httpsAgentRequestFields + }); } } else if (proxyMode === 'system') { const { http_proxy, https_proxy, no_proxy } = preferencesUtil.getSystemProxyEnvVariables(); @@ -257,6 +261,10 @@ const configureRequest = async ( } catch (error) { throw new Error('Invalid system https_proxy'); } + } else { + request.httpsAgent = new https.Agent({ + ...httpsAgentRequestFields + }); } } else if (Object.keys(httpsAgentRequestFields).length > 0) { request.httpsAgent = new https.Agent({