Skip to content

Commit

Permalink
fix(HTTP Request Node): Proxy IPv6 hostname fix (no-changelog) (#9149)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored and netroy committed Apr 18, 2024
1 parent d11ca79 commit c9d208c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/NodeExecuteFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,9 @@ export async function parseRequestObject(requestObject: IRequestOptions) {
if (typeof requestObject.proxy === 'string') {
try {
const url = new URL(requestObject.proxy);
const host = url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname;
axiosConfig.proxy = {
host: url.hostname,
host,
port: parseInt(url.port, 10),
protocol: url.protocol,
};
Expand All @@ -544,8 +545,9 @@ export async function parseRequestObject(requestObject: IRequestOptions) {
const [userpass, hostport] = requestObject.proxy.split('@');
const [username, password] = userpass.split(':');
const [hostname, port] = hostport.split(':');
const host = hostname.startsWith('[') ? hostname.slice(1, -1) : hostname;
axiosConfig.proxy = {
host: hostname,
host,
port: parseInt(port, 10),
protocol: 'http',
auth: {
Expand Down

0 comments on commit c9d208c

Please sign in to comment.