From bbb904437fa74bf5b2cf6e9e78b6755705f0e0a6 Mon Sep 17 00:00:00 2001 From: Chris Wilper Date: Sat, 21 Oct 2023 14:32:41 -0400 Subject: [PATCH] chore: re-sync proxy-util.js copies --- packages/bruno-cli/src/utils/proxy-util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-cli/src/utils/proxy-util.js b/packages/bruno-cli/src/utils/proxy-util.js index dd526d0d..a9fdc1b9 100644 --- a/packages/bruno-cli/src/utils/proxy-util.js +++ b/packages/bruno-cli/src/utils/proxy-util.js @@ -1,4 +1,5 @@ const parseUrl = require('url').parse; +const { isEmpty } = require('lodash'); const DEFAULT_PORTS = { ftp: 21, @@ -9,7 +10,7 @@ const DEFAULT_PORTS = { wss: 443 }; /** - * check for proxy bypass, Copied form 'proxy-from-env' + * check for proxy bypass, copied form 'proxy-from-env' */ const shouldUseProxy = (url, proxyBypass) => { if (proxyBypass === '*') { @@ -39,7 +40,6 @@ const shouldUseProxy = (url, proxyBypass) => { if (!dontProxyFor) { return true; // Skip zero-length hosts. } - const parsedProxy = dontProxyFor.match(/^(.+):(\d+)$/); let parsedProxyHostname = parsedProxy ? parsedProxy[1] : dontProxyFor; const parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;