From a5ce7e9c9ccb2c7a208e8d6c6207193b8a61ac21 Mon Sep 17 00:00:00 2001 From: Mirko Golze Date: Sun, 12 Nov 2023 21:41:25 +0100 Subject: [PATCH] #937, #921 improve evaluation of proxy configuration, allow empty proxy port --- packages/bruno-electron/src/ipc/network/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 9419d455..d6afbe6f 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -9,7 +9,7 @@ const Mustache = require('mustache'); const contentDispositionParser = require('content-disposition'); const mime = require('mime-types'); const { ipcMain } = require('electron'); -const { isEmpty, isUndefined, isNull, each, get, compact } = require('lodash'); +const { isUndefined, isNull, each, get, compact } = require('lodash'); const { VarsRuntime, AssertRuntime, ScriptRuntime, TestRuntime } = require('@usebruno/js'); const prepareRequest = require('./prepare-request'); const prepareGqlIntrospectionRequest = require('./prepare-gql-introspection-request'); @@ -126,7 +126,7 @@ const configureRequest = async ( // proxy configuration let proxyConfig = get(brunoConfig, 'proxy', {}); - let proxyEnabled = isEmpty(proxyConfig) ? 'global' : get(proxyConfig, 'enabled', false); + let proxyEnabled = get(proxyConfig, 'enabled', 'global'); if (proxyEnabled === 'global') { proxyConfig = preferencesUtil.getGlobalProxyConfig(); proxyEnabled = get(proxyConfig, 'enabled', false);