From 903c5b4363224d4f7d3d1516907256dcdf1b149b Mon Sep 17 00:00:00 2001 From: Wibaek Park <34394229+wibaek@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:12:46 +0900 Subject: [PATCH] fix: Ignore empty header on Auth API Key(Header) to prevent sending request error (#5007) --- packages/bruno-electron/src/ipc/network/prepare-request.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js index 777f0446d..0a95657c7 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-request.js @@ -61,6 +61,7 @@ const setAuthHeaders = (axiosRequest, request, collectionRoot) => { break; case 'apikey': const apiKeyAuth = get(collectionAuth, 'apikey'); + if (apiKeyAuth.key.length === 0) break; if (apiKeyAuth.placement === 'header') { axiosRequest.headers[apiKeyAuth.key] = apiKeyAuth.value; } else if (apiKeyAuth.placement === 'queryparams') { @@ -277,6 +278,7 @@ const setAuthHeaders = (axiosRequest, request, collectionRoot) => { break; case 'apikey': const apiKeyAuth = get(request, 'auth.apikey'); + if (apiKeyAuth.key.length === 0) break; if (apiKeyAuth.placement === 'header') { axiosRequest.headers[apiKeyAuth.key] = apiKeyAuth.value; } else if (apiKeyAuth.placement === 'queryparams') {