Skip to content

Commit

Permalink
temporarily disabling fix related to pr #1114
Browse files Browse the repository at this point in the history
  • Loading branch information
helloanoop committed Dec 4, 2023
1 parent e0969d6 commit b482dd6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/bruno-electron/src/ipc/network/axios-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b482dd6

Please sign in to comment.