@n8n/backend-network 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/http/{axios-config.js → axios/config.js} +3 -3
  3. package/dist/http/axios/config.js.map +1 -0
  4. package/dist/http/axios/legacy.d.ts +4 -0
  5. package/dist/http/axios/legacy.js +214 -0
  6. package/dist/http/axios/legacy.js.map +1 -0
  7. package/dist/http/{http-request.d.ts → axios/request.d.ts} +7 -1
  8. package/dist/http/{http-request.js → axios/request.js} +15 -16
  9. package/dist/http/axios/request.js.map +1 -0
  10. package/dist/http/{outbound-user-agent.js → axios/user-agent.js} +3 -3
  11. package/dist/http/axios/user-agent.js.map +1 -0
  12. package/dist/http/{axios-utils.d.ts → axios/utils.d.ts} +4 -3
  13. package/dist/http/{axios-utils.js → axios/utils.js} +23 -15
  14. package/dist/http/axios/utils.js.map +1 -0
  15. package/dist/http/env-proxy-http-agent.d.ts +8 -0
  16. package/dist/http/env-proxy-http-agent.js +24 -0
  17. package/dist/http/env-proxy-http-agent.js.map +1 -0
  18. package/dist/http/env-proxy-https-agent.d.ts +9 -0
  19. package/dist/http/env-proxy-https-agent.js +24 -0
  20. package/dist/http/env-proxy-https-agent.js.map +1 -0
  21. package/dist/http/env-proxy-router.d.ts +12 -0
  22. package/dist/http/env-proxy-router.js +55 -0
  23. package/dist/http/env-proxy-router.js.map +1 -0
  24. package/dist/http/http-proxy.js +4 -57
  25. package/dist/http/http-proxy.js.map +1 -1
  26. package/dist/http/index.d.ts +7 -4
  27. package/dist/http/index.js +10 -24
  28. package/dist/http/index.js.map +1 -1
  29. package/dist/http/legacy-request.d.ts +7 -0
  30. package/dist/http/legacy-request.js +90 -0
  31. package/dist/http/legacy-request.js.map +1 -0
  32. package/dist/http/local-server.d.ts +9 -0
  33. package/dist/http/local-server.js +31 -0
  34. package/dist/http/local-server.js.map +1 -0
  35. package/dist/http/node-agents.d.ts +21 -0
  36. package/dist/http/node-agents.js +65 -0
  37. package/dist/http/node-agents.js.map +1 -0
  38. package/dist/http/outbound-http.d.ts +42 -0
  39. package/dist/http/outbound-http.js +56 -0
  40. package/dist/http/outbound-http.js.map +1 -0
  41. package/dist/http/undici/transport.d.ts +12 -0
  42. package/dist/http/undici/transport.js +62 -0
  43. package/dist/http/undici/transport.js.map +1 -0
  44. package/dist/ssrf/ssrf-protection.service.d.ts +2 -0
  45. package/dist/ssrf/ssrf-protection.service.js +7 -0
  46. package/dist/ssrf/ssrf-protection.service.js.map +1 -1
  47. package/dist/testing.d.ts +4 -0
  48. package/dist/testing.js +14 -0
  49. package/dist/testing.js.map +1 -0
  50. package/package.json +28 -8
  51. package/dist/http/axios-config.js.map +0 -1
  52. package/dist/http/axios-utils.js.map +0 -1
  53. package/dist/http/http-request.js.map +0 -1
  54. package/dist/http/outbound-user-agent.js.map +0 -1
  55. /package/dist/http/{axios-config.d.ts → axios/config.d.ts} +0 -0
  56. /package/dist/http/{outbound-user-agent.d.ts → axios/user-agent.d.ts} +0 -0
@@ -8,7 +8,7 @@ const config_1 = require("@n8n/config");
8
8
  const di_1 = require("@n8n/di");
9
9
  const axios_1 = __importDefault(require("axios"));
10
10
  const qs_1 = require("qs");
11
- const axios_utils_1 = require("./axios-utils");
11
+ const utils_1 = require("./utils");
12
12
  let configured = false;
13
13
  function configureGlobalAxiosDefaults() {
14
14
  if (!configured) {
@@ -28,7 +28,7 @@ function configureGlobalAxiosDefaults() {
28
28
  if (config.data === undefined) {
29
29
  config.headers.setContentType(false, false);
30
30
  }
31
- (0, axios_utils_1.setAxiosAgents)(config);
31
+ (0, utils_1.setAxiosAgents)(config);
32
32
  applyVendorHeaders(config);
33
33
  return config;
34
34
  });
@@ -39,4 +39,4 @@ function applyVendorHeaders(config) {
39
39
  config.headers.set(di_1.Container.get(config_1.AiConfig).openAiDefaultHeaders, false);
40
40
  }
41
41
  }
42
- //# sourceMappingURL=axios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;YAE3B,OAAO,MAAM,CAAC;QACf,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAkC;IAC7D,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC;QAC5F,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,cAAS,CAAC,GAAG,CAAC,iBAAQ,CAAC,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IACzE,CAAC;AACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { AxiosRequestConfig } from 'axios';
2
+ import type { IRequestOptions } from 'n8n-workflow';
3
+ import type { SsrfBridge } from '../../ssrf';
4
+ export declare function buildAxiosConfigFromLegacyRequest(requestObject: IRequestOptions, ssrfBridge?: SsrfBridge): Promise<AxiosRequestConfig>;
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.buildAxiosConfigFromLegacyRequest = buildAxiosConfigFromLegacyRequest;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ const qs_1 = require("qs");
9
+ const user_agent_1 = require("./user-agent");
10
+ const utils_1 = require("./utils");
11
+ async function buildAxiosConfigFromLegacyRequest(requestObject, ssrfBridge) {
12
+ const axiosConfig = {};
13
+ if (requestObject.headers !== undefined) {
14
+ axiosConfig.headers = requestObject.headers;
15
+ }
16
+ const contentTypeHeaderKeyName = axiosConfig.headers &&
17
+ Object.keys(axiosConfig.headers).find((headerName) => headerName.toLowerCase() === 'content-type');
18
+ const contentType = contentTypeHeaderKeyName &&
19
+ axiosConfig.headers?.[contentTypeHeaderKeyName];
20
+ if (contentType === 'application/x-www-form-urlencoded' && requestObject.formData === undefined) {
21
+ if (typeof requestObject.body === 'string') {
22
+ axiosConfig.data = requestObject.body;
23
+ }
24
+ else {
25
+ const allData = Object.assign(requestObject.body || {}, requestObject.form || {});
26
+ if (requestObject.useQuerystring === true) {
27
+ axiosConfig.data = (0, qs_1.stringify)(allData, { arrayFormat: 'repeat' });
28
+ }
29
+ else {
30
+ axiosConfig.data = (0, qs_1.stringify)(allData);
31
+ }
32
+ }
33
+ }
34
+ else if (contentType?.includes('multipart/form-data')) {
35
+ if (requestObject.formData !== undefined && (0, utils_1.isFormDataInstance)(requestObject.formData)) {
36
+ axiosConfig.data = requestObject.formData;
37
+ }
38
+ else {
39
+ const allData = {
40
+ ...requestObject.body,
41
+ ...requestObject.formData,
42
+ };
43
+ axiosConfig.data = (0, utils_1.createFormDataObject)(allData);
44
+ }
45
+ delete axiosConfig.headers?.[contentTypeHeaderKeyName];
46
+ const headers = axiosConfig.data.getHeaders();
47
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, headers);
48
+ await (0, utils_1.generateContentLengthHeader)(axiosConfig);
49
+ }
50
+ else {
51
+ if (requestObject.form !== undefined && requestObject.body === undefined) {
52
+ axiosConfig.data =
53
+ typeof requestObject.form === 'string'
54
+ ? requestObject.form
55
+ : (0, qs_1.stringify)(requestObject.form).toString();
56
+ if (axiosConfig.headers !== undefined) {
57
+ const headerName = (0, utils_1.searchForHeader)(axiosConfig, 'content-type');
58
+ if (headerName) {
59
+ delete axiosConfig.headers[headerName];
60
+ }
61
+ axiosConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded';
62
+ }
63
+ else {
64
+ axiosConfig.headers = {
65
+ 'Content-Type': 'application/x-www-form-urlencoded',
66
+ };
67
+ }
68
+ }
69
+ else if (requestObject.formData !== undefined) {
70
+ if (axiosConfig.headers !== undefined) {
71
+ const headers = Object.keys(axiosConfig.headers);
72
+ headers.forEach((header) => {
73
+ if (header.toLowerCase() === 'content-type') {
74
+ delete axiosConfig.headers?.[header];
75
+ }
76
+ });
77
+ }
78
+ if ((0, utils_1.isFormDataInstance)(requestObject.formData)) {
79
+ axiosConfig.data = requestObject.formData;
80
+ }
81
+ else {
82
+ axiosConfig.data = (0, utils_1.createFormDataObject)(requestObject.formData);
83
+ }
84
+ const headers = axiosConfig.data.getHeaders();
85
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, headers);
86
+ await (0, utils_1.generateContentLengthHeader)(axiosConfig);
87
+ }
88
+ else if (requestObject.body !== undefined) {
89
+ if (requestObject.form !== undefined && requestObject.body) {
90
+ requestObject.body = Object.assign(requestObject.body, requestObject.form);
91
+ }
92
+ axiosConfig.data = requestObject.body;
93
+ }
94
+ }
95
+ if (requestObject.uri !== undefined) {
96
+ axiosConfig.url = requestObject.uri?.toString();
97
+ }
98
+ if (requestObject.url !== undefined) {
99
+ axiosConfig.url = requestObject.url?.toString();
100
+ }
101
+ if (requestObject.baseURL !== undefined) {
102
+ axiosConfig.baseURL = requestObject.baseURL?.toString();
103
+ }
104
+ if (requestObject.method !== undefined) {
105
+ axiosConfig.method = requestObject.method;
106
+ }
107
+ if (requestObject.qs !== undefined && Object.keys(requestObject.qs).length > 0) {
108
+ axiosConfig.params = requestObject.qs;
109
+ }
110
+ function hasArrayFormatOptions(arg) {
111
+ if (typeof arg.qsStringifyOptions === 'object' &&
112
+ arg.qsStringifyOptions !== null &&
113
+ !Array.isArray(arg.qsStringifyOptions) &&
114
+ 'arrayFormat' in arg.qsStringifyOptions) {
115
+ return true;
116
+ }
117
+ return false;
118
+ }
119
+ if (requestObject.useQuerystring === true ||
120
+ (hasArrayFormatOptions(requestObject) &&
121
+ requestObject.qsStringifyOptions.arrayFormat === 'repeat')) {
122
+ axiosConfig.paramsSerializer = (params) => {
123
+ return (0, qs_1.stringify)(params, { arrayFormat: 'repeat' });
124
+ };
125
+ }
126
+ else if (requestObject.useQuerystring === false) {
127
+ axiosConfig.paramsSerializer = (params) => {
128
+ return (0, qs_1.stringify)(params, { arrayFormat: 'indices' });
129
+ };
130
+ }
131
+ if (hasArrayFormatOptions(requestObject) &&
132
+ requestObject.qsStringifyOptions.arrayFormat === 'brackets') {
133
+ axiosConfig.paramsSerializer = (params) => {
134
+ return (0, qs_1.stringify)(params, { arrayFormat: 'brackets' });
135
+ };
136
+ }
137
+ if (requestObject.auth !== undefined) {
138
+ if (requestObject.auth.bearer !== undefined) {
139
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, {
140
+ Authorization: `Bearer ${requestObject.auth.bearer}`,
141
+ });
142
+ }
143
+ else {
144
+ const authObj = requestObject.auth;
145
+ axiosConfig.auth = {
146
+ username: (authObj.user || authObj.username),
147
+ password: (authObj.password || authObj.pass),
148
+ };
149
+ }
150
+ }
151
+ if (requestObject.json === true) {
152
+ const acceptHeaderExists = axiosConfig.headers === undefined
153
+ ? false
154
+ : Object.keys(axiosConfig.headers)
155
+ .map((headerKey) => headerKey.toLowerCase())
156
+ .includes('accept');
157
+ if (!acceptHeaderExists) {
158
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, {
159
+ Accept: 'application/json',
160
+ });
161
+ }
162
+ }
163
+ if (requestObject.json === false || requestObject.json === undefined) {
164
+ axiosConfig.transformResponse = (res) => res;
165
+ }
166
+ const { method } = requestObject;
167
+ if ((requestObject.followRedirect !== false &&
168
+ (!method || method === 'GET' || method === 'HEAD')) ||
169
+ requestObject.followAllRedirects) {
170
+ axiosConfig.maxRedirects = requestObject.maxRedirects;
171
+ }
172
+ else {
173
+ axiosConfig.maxRedirects = 0;
174
+ }
175
+ const host = (0, utils_1.getHostFromRequestObject)(requestObject);
176
+ const agentOptions = { ...requestObject.agentOptions };
177
+ if (host) {
178
+ agentOptions.servername = host;
179
+ }
180
+ if (requestObject.rejectUnauthorized === false) {
181
+ agentOptions.rejectUnauthorized = false;
182
+ agentOptions.secureOptions = crypto_1.default.constants.SSL_OP_LEGACY_SERVER_CONNECT;
183
+ }
184
+ if (requestObject.timeout !== undefined) {
185
+ axiosConfig.timeout = requestObject.timeout;
186
+ }
187
+ (0, utils_1.setAxiosAgents)(axiosConfig, agentOptions, requestObject.proxy, ssrfBridge ?? 'disabled');
188
+ axiosConfig.beforeRedirect = (0, utils_1.getBeforeRedirectFn)(agentOptions, axiosConfig, requestObject.proxy, requestObject.sendCredentialsOnCrossOriginRedirect ?? true, requestObject.allowedDomains, ssrfBridge ?? 'disabled');
189
+ if (requestObject.useStream) {
190
+ axiosConfig.responseType = 'stream';
191
+ }
192
+ else if (requestObject.encoding === null) {
193
+ axiosConfig.responseType = 'arraybuffer';
194
+ }
195
+ const allHeaders = axiosConfig.headers ? Object.keys(axiosConfig.headers) : [];
196
+ if (!allHeaders.some((headerKey) => headerKey.toLowerCase() === 'accept')) {
197
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, { accept: '*/*' });
198
+ }
199
+ if (requestObject.json !== false &&
200
+ axiosConfig.data !== undefined &&
201
+ axiosConfig.data !== '' &&
202
+ !(axiosConfig.data instanceof Buffer) &&
203
+ !allHeaders.some((headerKey) => headerKey.toLowerCase() === 'content-type')) {
204
+ axiosConfig.headers = Object.assign(axiosConfig.headers || {}, {
205
+ 'content-type': 'application/json',
206
+ });
207
+ }
208
+ if (requestObject.simple === false) {
209
+ axiosConfig.validateStatus = () => true;
210
+ }
211
+ (0, user_agent_1.applyDefaultOutboundUserAgent)(axiosConfig);
212
+ return axiosConfig;
213
+ }
214
+ //# sourceMappingURL=legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../src/http/axios/legacy.ts"],"names":[],"mappings":";;;;;AAgCA,8EAsSC;AA/TD,oDAA4B;AAI5B,2BAA+B;AAE/B,6CAA6D;AAC7D,mCAQiB;AAUV,KAAK,UAAU,iCAAiC,CACtD,aAA8B,EAC9B,UAAuB;IAEvB,MAAM,WAAW,GAAuB,EAAE,CAAC;IAE3C,IAAI,aAAa,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACzC,WAAW,CAA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,CAAC,IAAI,KAAK,SAAS;QAC9B,WAAW,CAAC,IAAI,KAAK,EAAE;QACvB,CAAC,CAAC,WAAW,CAAC,IAAI,YAAY,MAAM,CAAC;QACrC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,cAAc,CAAC,EAC1E,CAAC;QAMF,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,EAAE;YAC9D,cAAc,EAAE,kBAAkB;SAClC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;QACpC,WAAW,CAAC,cAAc,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC;IAED,IAAA,0CAA6B,EAAC,WAAW,CAAC,CAAC;IAQ3C,OAAO,WAAW,CAAC;AACpB,CAAC"}
@@ -1,7 +1,13 @@
1
1
  import type { AxiosRequestConfig } from 'axios';
2
2
  import type { IHttpRequestOptions, IN8nHttpFullResponse, IN8nHttpResponse, IRequestOptions } from 'n8n-workflow';
3
- import type { SsrfBridge } from '../ssrf';
3
+ import type { SsrfBridge } from '../../ssrf';
4
4
  export declare function invokeAxios(axiosConfig: AxiosRequestConfig, authOptions?: IRequestOptions['auth']): Promise<import("axios").AxiosResponse<any, any, {}>>;
5
5
  export declare function convertN8nRequestToAxios(n8nRequest: IHttpRequestOptions, ssrfBridge?: SsrfBridge): AxiosRequestConfig;
6
6
  export declare function removeEmptyBody(requestOptions: IHttpRequestOptions | IRequestOptions): void;
7
+ export declare function httpRequest(requestOptions: IHttpRequestOptions & {
8
+ returnFullResponse: true;
9
+ }, ssrfBridge?: SsrfBridge): Promise<IN8nHttpFullResponse>;
10
+ export declare function httpRequest(requestOptions: IHttpRequestOptions & {
11
+ returnFullResponse?: false;
12
+ }, ssrfBridge?: SsrfBridge): Promise<IN8nHttpResponse>;
7
13
  export declare function httpRequest(requestOptions: IHttpRequestOptions, ssrfBridge?: SsrfBridge): Promise<IN8nHttpFullResponse | IN8nHttpResponse>;
@@ -10,8 +10,8 @@ exports.httpRequest = httpRequest;
10
10
  const axios_1 = __importDefault(require("axios"));
11
11
  const n8n_workflow_1 = require("n8n-workflow");
12
12
  const qs_1 = require("qs");
13
- const axios_utils_1 = require("./axios-utils");
14
- const outbound_user_agent_1 = require("./outbound-user-agent");
13
+ const user_agent_1 = require("./user-agent");
14
+ const utils_1 = require("./utils");
15
15
  async function invokeAxios(axiosConfig, authOptions = {}) {
16
16
  try {
17
17
  return await (0, axios_1.default)(axiosConfig);
@@ -25,7 +25,7 @@ async function invokeAxios(axiosConfig, authOptions = {}) {
25
25
  }
26
26
  const { auth } = axiosConfig;
27
27
  delete axiosConfig.auth;
28
- axiosConfig = (0, axios_utils_1.digestAuthAxiosConfig)(axiosConfig, response, auth);
28
+ axiosConfig = (0, utils_1.digestAuthAxiosConfig)(axiosConfig, response, auth);
29
29
  return await (0, axios_1.default)(axiosConfig);
30
30
  }
31
31
  }
@@ -53,7 +53,7 @@ function convertN8nRequestToAxios(n8nRequest, ssrfBridge) {
53
53
  if (n8nRequest.encoding !== undefined) {
54
54
  axiosRequest.responseType = n8nRequest.encoding;
55
55
  }
56
- const host = (0, axios_utils_1.getHostFromRequestObject)(n8nRequest);
56
+ const host = (0, utils_1.getHostFromRequestObject)(n8nRequest);
57
57
  const agentOptions = { ...n8nRequest.agentOptions };
58
58
  if (host) {
59
59
  agentOptions.servername = host;
@@ -61,9 +61,8 @@ function convertN8nRequestToAxios(n8nRequest, ssrfBridge) {
61
61
  if (n8nRequest.skipSslCertificateValidation === true) {
62
62
  agentOptions.rejectUnauthorized = false;
63
63
  }
64
- const secureLookup = ssrfBridge?.createSecureLookup();
65
- (0, axios_utils_1.setAxiosAgents)(axiosRequest, agentOptions, proxy, secureLookup);
66
- axiosRequest.beforeRedirect = (0, axios_utils_1.getBeforeRedirectFn)(agentOptions, axiosRequest, n8nRequest.proxy, n8nRequest.sendCredentialsOnCrossOriginRedirect ?? true, n8nRequest.allowedDomains, ssrfBridge);
64
+ (0, utils_1.setAxiosAgents)(axiosRequest, agentOptions, proxy, ssrfBridge ?? 'disabled');
65
+ axiosRequest.beforeRedirect = (0, utils_1.getBeforeRedirectFn)(agentOptions, axiosRequest, n8nRequest.proxy, n8nRequest.sendCredentialsOnCrossOriginRedirect ?? true, n8nRequest.allowedDomains, ssrfBridge ?? 'disabled');
67
66
  if (n8nRequest.arrayFormat !== undefined) {
68
67
  axiosRequest.paramsSerializer = (params) => {
69
68
  return (0, qs_1.stringify)(params, { arrayFormat: n8nRequest.arrayFormat });
@@ -71,10 +70,10 @@ function convertN8nRequestToAxios(n8nRequest, ssrfBridge) {
71
70
  }
72
71
  const { body } = n8nRequest;
73
72
  if (body) {
74
- const existingContentTypeHeaderKey = (0, axios_utils_1.searchForHeader)(axiosRequest, 'content-type');
73
+ const existingContentTypeHeaderKey = (0, utils_1.searchForHeader)(axiosRequest, 'content-type');
75
74
  if (existingContentTypeHeaderKey === undefined) {
76
75
  axiosRequest.headers = axiosRequest.headers || {};
77
- if ((0, axios_utils_1.isFormDataInstance)(body)) {
76
+ if ((0, utils_1.isFormDataInstance)(body)) {
78
77
  axiosRequest.headers = {
79
78
  ...axiosRequest.headers,
80
79
  ...body.getHeaders(),
@@ -92,7 +91,7 @@ function convertN8nRequestToAxios(n8nRequest, ssrfBridge) {
92
91
  }
93
92
  }
94
93
  if (n8nRequest.json) {
95
- const key = (0, axios_utils_1.searchForHeader)(axiosRequest, 'accept');
94
+ const key = (0, utils_1.searchForHeader)(axiosRequest, 'accept');
96
95
  if (!key) {
97
96
  axiosRequest.headers = {
98
97
  ...axiosRequest.headers,
@@ -100,10 +99,10 @@ function convertN8nRequestToAxios(n8nRequest, ssrfBridge) {
100
99
  };
101
100
  }
102
101
  }
103
- (0, outbound_user_agent_1.applyDefaultOutboundUserAgent)(axiosRequest);
102
+ (0, user_agent_1.applyDefaultOutboundUserAgent)(axiosRequest);
104
103
  if (n8nRequest.ignoreHttpStatusErrors) {
105
104
  const ignoreHttpStatusErrors = n8nRequest.ignoreHttpStatusErrors;
106
- if ((0, axios_utils_1.isIgnoreStatusErrorConfig)(ignoreHttpStatusErrors)) {
105
+ if ((0, utils_1.isIgnoreStatusErrorConfig)(ignoreHttpStatusErrors)) {
107
106
  axiosRequest.validateStatus = (status) => {
108
107
  return !ignoreHttpStatusErrors.except.includes(status);
109
108
  };
@@ -135,14 +134,14 @@ function removeEmptyBody(requestOptions) {
135
134
  }
136
135
  async function httpRequest(requestOptions, ssrfBridge) {
137
136
  removeEmptyBody(requestOptions);
138
- const url = (0, axios_utils_1.buildTargetUrl)(requestOptions.url, requestOptions.baseURL) ?? requestOptions.url;
139
- await (0, axios_utils_1.validateUrlSsrf)(url, ssrfBridge);
137
+ const url = (0, utils_1.buildTargetUrl)(requestOptions.url, requestOptions.baseURL) ?? requestOptions.url;
138
+ await (0, utils_1.validateUrlSsrf)(url, ssrfBridge);
140
139
  const axiosRequest = convertN8nRequestToAxios(requestOptions, ssrfBridge);
141
140
  if (axiosRequest.data === undefined ||
142
141
  (axiosRequest.method !== undefined && axiosRequest.method.toUpperCase() === 'GET')) {
143
142
  delete axiosRequest.data;
144
143
  }
145
- (0, axios_utils_1.throwIfDomainNotAllowed)(axiosRequest, requestOptions.allowedDomains);
144
+ (0, utils_1.throwIfDomainNotAllowed)(axiosRequest, requestOptions.allowedDomains);
146
145
  const result = await invokeAxios(axiosRequest, requestOptions.auth);
147
146
  if (requestOptions.returnFullResponse) {
148
147
  return {
@@ -154,4 +153,4 @@ async function httpRequest(requestOptions, ssrfBridge) {
154
153
  }
155
154
  return result.data;
156
155
  }
157
- //# sourceMappingURL=http-request.js.map
156
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/http/axios/request.ts"],"names":[],"mappings":";;;;;AA6BA,kCAkBC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aultOutboundUserAgent;
6
6
  const config_1 = require("@n8n/config");
7
7
  const di_1 = require("@n8n/di");
8
8
  const node_path_1 = require("node:path");
9
- const axios_utils_1 = require("./axios-utils");
9
+ const utils_1 = require("./utils");
10
10
  const N8N_PRODUCT_URL = 'https://n8n.io/';
11
11
  const LEGACY_USER_AGENT = 'n8n';
12
12
  function readN8nVersion() {
@@ -30,11 +30,11 @@ function getDefaultN8nOutboundUserAgent() {
30
30
  return buildRfcStyleUserAgent(readN8nVersion());
31
31
  }
32
32
  function applyDefaultOutboundUserAgent(axiosConfig) {
33
- if ((0, axios_utils_1.searchForHeader)(axiosConfig, 'user-agent'))
33
+ if ((0, utils_1.searchForHeader)(axiosConfig, 'user-agent'))
34
34
  return;
35
35
  axiosConfig.headers = {
36
36
  ...axiosConfig.headers,
37
37
  'User-Agent': getDefaultN8nOutboundUserAgent(),
38
38
  };
39
39
  }
40
- //# sourceMappingURL=outbound-user-agent.js.map
40
+ //# sourceMappingURL=user-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-agent.js","sourceRoot":"","sources":["../../../src/http/axios/user-agent.ts"],"names":[],"mappings":";;AA2BA,wDAEC;AAUD,wEAQC;AAMD,sEAOC;AA5DD,wCAAgD;AAChD,gCAAoC;AAEpC,yCAAiC;AAEjC,mCAA0C;AAE1C,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEhC,SAAS,cAAc;IACtB,IAAI,CAAC;QAGJ,MAAM,GAAG,GAAG,OAAO,CAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,0BAA0B,CAAC,CAAwB,CAAC;QACxF,OAAO,GAAG,CAAC,OAAO,CAAC;IACpB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,OAAO,CAAC;IAChB,CAAC;AACF,CAAC;AAQD,SAAgB,sBAAsB,CAAC,OAAe;IACrD,OAAO,gCAAgC,OAAO,MAAM,eAAe,GAAG,CAAC;AACxE,CAAC;AAUD,SAAgB,8BAA8B;IAC7C,MAAM,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,GAAG,cAAS,CAAC,GAAG,CAAC,0BAAiB,CAAC,CAAC;IAE1F,IAAI,CAAC,sBAAsB;QAAE,OAAO,iBAAiB,CAAC;IAEtD,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,oBAAoB,CAAC;IAEjE,OAAO,sBAAsB,CAAC,cAAc,EAAE,CAAC,CAAC;AACjD,CAAC;AAMD,SAAgB,6BAA6B,CAAC,WAA+B;IAC5E,IAAI,IAAA,uBAAe,EAAC,WAAW,EAAE,YAAY,CAAC;QAAE,OAAO;IAEvD,WAAW,CAAC,OAAO,GAAG;QACrB,GAAG,WAAW,CAAC,OAAO;QACtB,YAAY,EAAE,8BAA8B,EAAE;KAC9C,CAAC;AACH,CAAC"}
@@ -2,7 +2,8 @@ import type { AxiosRequestConfig, AxiosResponse } from 'axios';
2
2
  import FormData from 'form-data';
3
3
  import type { AgentOptions } from 'https';
4
4
  import { type IHttpRequestOptions, type IRequestOptions, type IgnoreStatusErrorConfig } from 'n8n-workflow';
5
- import type { SsrfBridge } from '../ssrf';
5
+ import type { SsrfBridge } from '../../ssrf';
6
+ import type { SsrfOption } from '../node-agents';
6
7
  export declare function throwIfDomainNotAllowed(configOrUrl: AxiosRequestConfig | string, allowedDomains?: string): void;
7
8
  export declare function tryParseUrl(url: string): URL | null;
8
9
  export declare function isIgnoreStatusErrorConfig(ignoreHttpStatusErrors: unknown): ignoreHttpStatusErrors is IgnoreStatusErrorConfig;
@@ -12,13 +13,13 @@ export declare const getHostFromRequestObject: (requestObject: Partial<{
12
13
  uri: string;
13
14
  baseURL: string;
14
15
  }>) => string | null;
15
- export declare const getBeforeRedirectFn: (agentOptions: AgentOptions, axiosConfig: AxiosRequestConfig, proxyConfig: IHttpRequestOptions["proxy"] | string | undefined, sendCredentialsOnCrossOriginRedirect: boolean, allowedDomains?: string, ssrfBridge?: SsrfBridge) => (redirectedRequest: Record<string, any>) => void;
16
+ export declare const getBeforeRedirectFn: (agentOptions: AgentOptions, axiosConfig: AxiosRequestConfig, proxyConfig: IHttpRequestOptions["proxy"] | string | undefined, sendCredentialsOnCrossOriginRedirect: boolean, allowedDomains?: string, ssrf?: SsrfOption) => (redirectedRequest: Record<string, any>) => void;
16
17
  export declare function digestAuthAxiosConfig(axiosConfig: AxiosRequestConfig, response: AxiosResponse, auth: AxiosRequestConfig['auth']): AxiosRequestConfig;
17
18
  export declare const createFormDataObject: (data: Record<string, unknown>) => FormData;
18
19
  export declare function isFormDataInstance(data: unknown): data is FormData;
19
20
  export declare function generateContentLengthHeader(config: AxiosRequestConfig): Promise<void>;
20
21
  export declare function getUrlFromProxyConfig(proxyConfig: IHttpRequestOptions['proxy'] | string): string | null;
21
22
  export declare function buildTargetUrl(url?: string, baseURL?: string): string | undefined;
22
- export declare function setAxiosAgents(config: AxiosRequestConfig, agentOptions?: AgentOptions, proxyConfig?: IHttpRequestOptions['proxy'] | string, secureLookup?: ReturnType<SsrfBridge['createSecureLookup']>): void;
23
+ export declare function setAxiosAgents(config: AxiosRequestConfig, agentOptions?: AgentOptions, proxyConfig?: IHttpRequestOptions['proxy'] | string, ssrf?: SsrfOption): void;
23
24
  export declare function validateUrlSsrf(url: string | undefined, ssrfBridge?: SsrfBridge): Promise<void>;
24
25
  export declare function resolveLegacyRequestUrl(requestObject: IRequestOptions): string | undefined;
@@ -22,7 +22,7 @@ const axios_1 = __importDefault(require("axios"));
22
22
  const crypto_1 = __importDefault(require("crypto"));
23
23
  const form_data_1 = __importDefault(require("form-data"));
24
24
  const n8n_workflow_1 = require("n8n-workflow");
25
- const http_proxy_1 = require("./http-proxy");
25
+ const node_agents_1 = require("../node-agents");
26
26
  function throwIfDomainNotAllowed(configOrUrl, allowedDomains) {
27
27
  const url = typeof configOrUrl === 'string' ? configOrUrl : axios_1.default.getUri(configOrUrl);
28
28
  (0, n8n_workflow_1.assertUrlAllowed)({ url, allowedDomains });
@@ -59,22 +59,29 @@ const getHostFromRequestObject = (requestObject) => {
59
59
  }
60
60
  };
61
61
  exports.getHostFromRequestObject = getHostFromRequestObject;
62
- const getBeforeRedirectFn = (agentOptions, axiosConfig, proxyConfig, sendCredentialsOnCrossOriginRedirect, allowedDomains, ssrfBridge) => (redirectedRequest) => {
62
+ function resolveProxyOption(customProxyUrl) {
63
+ if (!customProxyUrl) {
64
+ return 'env';
65
+ }
66
+ if ((0, node_agents_1.isSupportedProxyUrl)(customProxyUrl)) {
67
+ return customProxyUrl;
68
+ }
69
+ di_1.Container.get(backend_common_1.Logger).warn(`Ignoring unsupported proxy URL "${customProxyUrl}", falling back to environment proxy settings`);
70
+ return 'env';
71
+ }
72
+ const getBeforeRedirectFn = (agentOptions, axiosConfig, proxyConfig, sendCredentialsOnCrossOriginRedirect, allowedDomains, ssrf = 'disabled') => (redirectedRequest) => {
63
73
  throwIfDomainNotAllowed(redirectedRequest.href, allowedDomains);
64
- if (ssrfBridge) {
65
- ssrfBridge.validateRedirectSync(redirectedRequest.href);
74
+ if (ssrf !== 'disabled') {
75
+ ssrf.validateRedirectSync(redirectedRequest.href);
66
76
  }
67
77
  const redirectAgentOptions = {
68
78
  ...agentOptions,
69
79
  servername: redirectedRequest.hostname,
70
80
  };
71
81
  const customProxyUrl = proxyConfig ? getUrlFromProxyConfig(proxyConfig) : null;
72
- const effectiveRedirectOptions = ssrfBridge && !customProxyUrl
73
- ? { ...redirectAgentOptions, lookup: ssrfBridge.createSecureLookup() }
74
- : redirectAgentOptions;
82
+ const proxy = resolveProxyOption(customProxyUrl);
75
83
  const targetUrl = redirectedRequest.href;
76
- const httpAgent = (0, http_proxy_1.createHttpProxyAgent)(customProxyUrl, targetUrl, effectiveRedirectOptions);
77
- const httpsAgent = (0, http_proxy_1.createHttpsProxyAgent)(customProxyUrl, targetUrl, effectiveRedirectOptions);
84
+ const { httpAgent, httpsAgent } = (0, node_agents_1.buildNodeAgents)(proxy, ssrf, redirectAgentOptions);
78
85
  redirectedRequest.agent = redirectedRequest.href.startsWith('https://')
79
86
  ? httpsAgent
80
87
  : httpAgent;
@@ -227,16 +234,17 @@ function buildTargetUrl(url, baseURL) {
227
234
  return undefined;
228
235
  }
229
236
  }
230
- function setAxiosAgents(config, agentOptions, proxyConfig, secureLookup) {
237
+ function setAxiosAgents(config, agentOptions, proxyConfig, ssrf = 'disabled') {
231
238
  if (config.httpAgent || config.httpsAgent)
232
239
  return;
233
- const customProxyUrl = getUrlFromProxyConfig(proxyConfig);
234
240
  const targetUrl = buildTargetUrl(config.url, config.baseURL);
235
241
  if (!targetUrl)
236
242
  return;
237
- const effectiveOptions = secureLookup && !customProxyUrl ? { ...agentOptions, lookup: secureLookup } : agentOptions;
238
- config.httpAgent = (0, http_proxy_1.createHttpProxyAgent)(customProxyUrl, targetUrl, effectiveOptions);
239
- config.httpsAgent = (0, http_proxy_1.createHttpsProxyAgent)(customProxyUrl, targetUrl, effectiveOptions);
243
+ const customProxyUrl = proxyConfig ? getUrlFromProxyConfig(proxyConfig) : null;
244
+ const proxy = resolveProxyOption(customProxyUrl);
245
+ const { httpAgent, httpsAgent } = (0, node_agents_1.buildNodeAgents)(proxy, ssrf, agentOptions);
246
+ config.httpAgent = httpAgent;
247
+ config.httpsAgent = httpsAgent;
240
248
  }
241
249
  async function validateUrlSsrf(url, ssrfBridge) {
242
250
  if (!ssrfBridge || !url)
@@ -254,4 +262,4 @@ function resolveLegacyRequestUrl(requestObject) {
254
262
  const baseURL = requestObject.baseURL?.toString();
255
263
  return buildTargetUrl(rawUrl, baseURL) ?? rawUrl;
256
264
  }
257
- //# sourceMappingURL=axios-utils.js.map
265
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/http/axios/utils.ts"],"names":[],"mappings":";;;;;;AAkBA,0DAMC;AAGD,kCAMC;AAGD,8DASC;AAGD,0CAQC;AA4FD,sDAiDC;AAmCD,gDAUC;AAGD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W,CAAC,CAAC,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/E,MAAM,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAIjD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAA,6BAAe,EAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;IAC7E,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AAChC,CAAC;AAGM,KAAK,UAAU,eAAe,CACpC,GAAuB,EACvB,UAAuB;IAEvB,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG;QAAE,OAAO;IAEhC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QAChB,MAAM,MAAM,CAAC,KAAK,CAAC;IACpB,CAAC;AACF,CAAC;AAED,SAAgB,uBAAuB,CAAC,aAA8B;IACrE,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;IAC9E,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;IAClD,OAAO,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC;AAClD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import http from 'node:http';
2
+ import type { LookupFunction } from 'node:net';
3
+ import type { NodeAgentOptions } from './node-agents';
4
+ export declare class EnvProxyHttpAgent extends http.Agent {
5
+ private readonly router;
6
+ constructor(lookup?: LookupFunction, agentOptions?: NodeAgentOptions);
7
+ addRequest(req: http.ClientRequest, options: http.RequestOptions): void;
8
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EnvProxyHttpAgent = void 0;
7
+ const http_proxy_agent_1 = require("http-proxy-agent");
8
+ const node_http_1 = __importDefault(require("node:http"));
9
+ const env_proxy_router_1 = require("./env-proxy-router");
10
+ class EnvProxyHttpAgent extends node_http_1.default.Agent {
11
+ constructor(lookup, agentOptions) {
12
+ super({ ...agentOptions, lookup });
13
+ this.router = new env_proxy_router_1.EnvProxyRouter('http', 80, (proxyUrl) => new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { ...agentOptions }));
14
+ }
15
+ addRequest(req, options) {
16
+ const proxyAgent = this.router.resolve(options);
17
+ if (proxyAgent) {
18
+ return proxyAgent.addRequest(req, options);
19
+ }
20
+ super.addRequest(req, options);
21
+ }
22
+ }
23
+ exports.EnvProxyHttpAgent = EnvProxyHttpAgent;
24
+ //# sourceMappingURL=env-proxy-http-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-proxy-http-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-http-agent.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAkD;AAClD,0DAA6B;AAG7B,yDAAoD;AAepD,MAAa,iBAAkB,SAAQ,mBAAI,CAAC,KAAK;IAGhD,YAAY,MAAuB,EAAE,YAA+B;QACnE,KAAK,CAAC,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,iCAAc,CAC/B,MAAM,EACN,EAAE,EACF,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,iCAAc,CAAC,QAAQ,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC,CAC/D,CAAC;IACH,CAAC;IAED,UAAU,CAAC,GAAuB,EAAE,OAA4B;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,UAAU,EAAE,CAAC;YAChB,OAAO,UAAU,CAAC,UAAU,CAAC,GAAyB,EAAE,OAA2B,CAAC,CAAC;QACtF,CAAC;QAGD,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;CACD;AAtBD,8CAsBC"}
@@ -0,0 +1,9 @@
1
+ import type http from 'node:http';
2
+ import https from 'node:https';
3
+ import type { LookupFunction } from 'node:net';
4
+ import type { NodeAgentOptions } from './node-agents';
5
+ export declare class EnvProxyHttpsAgent extends https.Agent {
6
+ private readonly router;
7
+ constructor(lookup?: LookupFunction, agentOptions?: NodeAgentOptions);
8
+ addRequest(req: http.ClientRequest, options: https.RequestOptions): void;
9
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EnvProxyHttpsAgent = void 0;
7
+ const https_proxy_agent_1 = require("https-proxy-agent");
8
+ const node_https_1 = __importDefault(require("node:https"));
9
+ const env_proxy_router_1 = require("./env-proxy-router");
10
+ class EnvProxyHttpsAgent extends node_https_1.default.Agent {
11
+ constructor(lookup, agentOptions) {
12
+ super({ ...agentOptions, lookup });
13
+ this.router = new env_proxy_router_1.EnvProxyRouter('https', 443, (proxyUrl) => new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { ...agentOptions }));
14
+ }
15
+ addRequest(req, options) {
16
+ const proxyAgent = this.router.resolve(options);
17
+ if (proxyAgent) {
18
+ return proxyAgent.addRequest(req, options);
19
+ }
20
+ super.addRequest(req, options);
21
+ }
22
+ }
23
+ exports.EnvProxyHttpsAgent = EnvProxyHttpsAgent;
24
+ //# sourceMappingURL=env-proxy-https-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-proxy-https-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-https-agent.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAoD;AAEpD,4DAA+B;AAG/B,yDAAoD;AAQpD,MAAa,kBAAmB,SAAQ,oBAAK,CAAC,KAAK;IAGlD,YAAY,MAAuB,EAAE,YAA+B;QACnE,KAAK,CAAC,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,iCAAc,CAC/B,OAAO,EACP,GAAG,EACH,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,mCAAe,CAAC,QAAQ,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC,CAChE,CAAC;IACH,CAAC;IAED,UAAU,CAAC,GAAuB,EAAE,OAA6B;QAChE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,UAAU,EAAE,CAAC;YAChB,OAAO,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,OAA4B,CAAC,CAAC;QACjE,CAAC;QAGD,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;CACD;AAtBD,gDAsBC"}