From b482dd68a500fd5fe1a18145f47279adc0881dec Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Mon, 4 Dec 2023 14:34:26 +0530 Subject: [PATCH] temporarily disabling fix related to pr #1114 --- .../src/ipc/network/axios-instance.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/axios-instance.js b/packages/bruno-electron/src/ipc/network/axios-instance.js index 262785990..2894ee008 100644 --- a/packages/bruno-electron/src/ipc/network/axios-instance.js +++ b/packages/bruno-electron/src/ipc/network/axios-instance.js @@ -43,15 +43,16 @@ function makeAxiosInstance() { // Resolve all *.localhost to localhost and check if it should use IPv6 or IPv4 // RFC: 6761 section 6.3 (https://tools.ietf.org/html/rfc6761#section-6.3) // @see https://github.com/usebruno/bruno/issues/124 - if (getTld(url.hostname) === 'localhost') { - config.headers.Host = url.hostname; // Put original hostname in Host + // temporarily disabling the fix (- Anoop) + // if (getTld(url.hostname) === 'localhost') { + // config.headers.Host = url.hostname; // Put original hostname in Host - const portNumber = Number(url.port) || (url.protocol.includes('https') ? 443 : 80); - const useIpv6 = await checkConnection('::1', portNumber); - url.hostname = useIpv6 ? '::1' : '127.0.0.1'; - delete url.host; // Clear hostname cache - config.url = URL.format(url); - } + // const portNumber = Number(url.port) || (url.protocol.includes('https') ? 443 : 80); + // const useIpv6 = await checkConnection('::1', portNumber); + // url.hostname = useIpv6 ? '::1' : '127.0.0.1'; + // delete url.host; // Clear hostname cache + // config.url = URL.format(url); + // } config.headers['request-start-time'] = Date.now(); return config;