From 29e6470f7ab6c09e24e370a62b29f3856fabb907 Mon Sep 17 00:00:00 2001 From: naman-bruno Date: Fri, 25 Jul 2025 18:05:10 +0530 Subject: [PATCH] fix: insecure requests not working (#5197) --- packages/bruno-cli/src/runner/run-single-request.js | 4 ++++ packages/bruno-electron/src/utils/proxy-util.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/packages/bruno-cli/src/runner/run-single-request.js b/packages/bruno-cli/src/runner/run-single-request.js index e8ecb4d61..55397c7c4 100644 --- a/packages/bruno-cli/src/runner/run-single-request.js +++ b/packages/bruno-cli/src/runner/run-single-request.js @@ -287,6 +287,10 @@ const runSingleRequest = async function ( https_proxy, Object.keys(httpsAgentRequestFields).length > 0 ? { ...httpsAgentRequestFields } : undefined ); + } else { + request.httpsAgent = new https.Agent({ + ...httpsAgentRequestFields + }); } } catch (error) { throw new Error('Invalid system https_proxy'); diff --git a/packages/bruno-electron/src/utils/proxy-util.js b/packages/bruno-electron/src/utils/proxy-util.js index 2a9ef26cb..f611ea1f6 100644 --- a/packages/bruno-electron/src/utils/proxy-util.js +++ b/packages/bruno-electron/src/utils/proxy-util.js @@ -368,6 +368,9 @@ function setupProxyAgents({ { proxy: https_proxy,...tlsOptions }, timeline ); + } else { + const TimelineHttpsAgent = createTimelineAgentClass(https.Agent); + requestConfig.httpsAgent = new TimelineHttpsAgent(tlsOptions, timeline); } } catch (error) { throw new Error('Invalid system https_proxy');