mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fixes: #11758 with a workaround with https proxy-agent
This commit is contained in:
parent
bd924c7194
commit
58432de408
|
@ -91,5 +91,8 @@
|
||||||
"@types/ws@8.5.4": "patches/@types__ws@8.5.4.patch",
|
"@types/ws@8.5.4": "patches/@types__ws@8.5.4.patch",
|
||||||
"@types/uuencode@0.0.3": "patches/@types__uuencode@0.0.3.patch"
|
"@types/uuencode@0.0.3": "patches/@types__uuencode@0.0.3.patch"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"proxy-agent": "^6.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,8 @@ import {
|
||||||
import { ScheduledTaskManager } from './ScheduledTaskManager';
|
import { ScheduledTaskManager } from './ScheduledTaskManager';
|
||||||
import { getSecretsProxy } from './Secrets';
|
import { getSecretsProxy } from './Secrets';
|
||||||
import { SSHClientsManager } from './SSHClientsManager';
|
import { SSHClientsManager } from './SSHClientsManager';
|
||||||
|
import { ProxyAgent } from 'proxy-agent';
|
||||||
|
import https from 'https';
|
||||||
|
|
||||||
axios.defaults.timeout = 300000;
|
axios.defaults.timeout = 300000;
|
||||||
// Prevent axios from adding x-form-www-urlencoded headers by default
|
// Prevent axios from adding x-form-www-urlencoded headers by default
|
||||||
|
@ -532,8 +534,8 @@ export async function parseRequestObject(requestObject: IRequestOptions) {
|
||||||
agentOptions.secureOptions = crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT;
|
agentOptions.secureOptions = crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
axiosConfig.httpsAgent = new Agent(agentOptions);
|
axiosConfig.httpsAgent = new ProxyAgent({ httpsAgent: new https.Agent(agentOptions) });
|
||||||
|
axiosConfig.proxy = false;
|
||||||
axiosConfig.beforeRedirect = getBeforeRedirectFn(agentOptions, axiosConfig);
|
axiosConfig.beforeRedirect = getBeforeRedirectFn(agentOptions, axiosConfig);
|
||||||
|
|
||||||
if (requestObject.timeout !== undefined) {
|
if (requestObject.timeout !== undefined) {
|
||||||
|
@ -945,8 +947,8 @@ function convertN8nRequestToAxios(n8nRequest: IHttpRequestOptions): AxiosRequest
|
||||||
if (n8nRequest.skipSslCertificateValidation === true) {
|
if (n8nRequest.skipSslCertificateValidation === true) {
|
||||||
agentOptions.rejectUnauthorized = false;
|
agentOptions.rejectUnauthorized = false;
|
||||||
}
|
}
|
||||||
axiosRequest.httpsAgent = new Agent(agentOptions);
|
axiosRequest.httpsAgent = new ProxyAgent({ httpsAgent: new https.Agent(agentOptions) });
|
||||||
|
axiosRequest.proxy = false;
|
||||||
axiosRequest.beforeRedirect = getBeforeRedirectFn(agentOptions, axiosRequest);
|
axiosRequest.beforeRedirect = getBeforeRedirectFn(agentOptions, axiosRequest);
|
||||||
|
|
||||||
if (n8nRequest.arrayFormat !== undefined) {
|
if (n8nRequest.arrayFormat !== undefined) {
|
||||||
|
|
404
pnpm-lock.yaml
404
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -13,6 +13,7 @@ catalog:
|
||||||
'@types/uuid': ^10.0.0
|
'@types/uuid': ^10.0.0
|
||||||
'@types/xml2js': ^0.4.14
|
'@types/xml2js': ^0.4.14
|
||||||
axios: 1.7.4
|
axios: 1.7.4
|
||||||
|
proxy-agent: 6.4.0
|
||||||
basic-auth: 2.0.1
|
basic-auth: 2.0.1
|
||||||
chokidar: 4.0.1
|
chokidar: 4.0.1
|
||||||
fast-glob: 3.2.12
|
fast-glob: 3.2.12
|
||||||
|
|
Loading…
Reference in a new issue