@n8n/backend-network 1.11.0 → 1.12.0

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.
@@ -1,7 +1,7 @@
1
1
  import type { HttpRequestDefaultHeaders } from './client-default-headers';
2
- import type { SsrfOption } from './node-agents';
2
+ import type { UseDefaultSsrfPolicy } from './use-default-ssrf-policy';
3
3
  export interface HttpRequestClientOptions {
4
- ssrf?: SsrfOption;
4
+ useDefaultSsrfPolicy?: UseDefaultSsrfPolicy;
5
5
  baseURL?: string;
6
6
  headers?: HttpRequestDefaultHeaders | (() => HttpRequestDefaultHeaders);
7
7
  timeout?: number;
@@ -9,7 +9,7 @@ const env_proxy_router_1 = require("./env-proxy-router");
9
9
  const proxied_agents_1 = require("../proxy/proxied-agents");
10
10
  class EnvProxyHttpAgent extends node_http_1.default.Agent {
11
11
  constructor(lookup, agentOptions) {
12
- super({ ...agentOptions, lookup });
12
+ super({ ...agentOptions, ...(lookup && { lookup }) });
13
13
  this.router = new env_proxy_router_1.EnvProxyRouter('http', 80, (proxyUrl) => (0, proxied_agents_1.createProxiedHttpAgent)(proxyUrl, agentOptions));
14
14
  }
15
15
  addRequest(req, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"env-proxy-http-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-http-agent.ts"],"names":[],"mappings":";;;;;;AACA,0DAA6B;AAG7B,yDAAoD;AAEpD,4DAAiE;AAgBjE,uBAA+B,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,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzD,IAAA,uCAAsB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAC9C,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"}
1
+ {"version":3,"file":"env-proxy-http-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-http-agent.ts"],"names":[],"mappings":";;;;;;AACA,0DAA6B;AAG7B,yDAAoD;AAEpD,4DAAiE;AAgBjE,uBAA+B,SAAQ,mBAAI,CAAC,KAAK;IAGhD,YAAY,MAAuB,EAAE,YAA+B;QACnE,KAAK,CAAC,EAAE,GAAG,YAAY,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,iCAAc,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CACzD,IAAA,uCAAsB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAC9C,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"}
@@ -9,7 +9,7 @@ const env_proxy_router_1 = require("./env-proxy-router");
9
9
  const proxied_agents_1 = require("../proxy/proxied-agents");
10
10
  class EnvProxyHttpsAgent extends node_https_1.default.Agent {
11
11
  constructor(lookup, agentOptions) {
12
- super({ ...agentOptions, lookup });
12
+ super({ ...agentOptions, ...(lookup && { lookup }) });
13
13
  this.router = new env_proxy_router_1.EnvProxyRouter('https', 443, (proxyUrl) => (0, proxied_agents_1.createProxiedHttpsAgent)(proxyUrl, agentOptions));
14
14
  }
15
15
  addRequest(req, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"env-proxy-https-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-https-agent.ts"],"names":[],"mappings":";;;;;;AAEA,4DAA+B;AAG/B,yDAAoD;AAEpD,4DAAkE;AAOlE,wBAAgC,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,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAC3D,IAAA,wCAAuB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAC/C,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"}
1
+ {"version":3,"file":"env-proxy-https-agent.js","sourceRoot":"","sources":["../../src/http/env-proxy-https-agent.ts"],"names":[],"mappings":";;;;;;AAEA,4DAA+B;AAG/B,yDAAoD;AAEpD,4DAAkE;AAOlE,wBAAgC,SAAQ,oBAAK,CAAC,KAAK;IAGlD,YAAY,MAAuB,EAAE,YAA+B;QACnE,KAAK,CAAC,EAAE,GAAG,YAAY,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,iCAAc,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAC3D,IAAA,wCAAuB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAC/C,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"}
@@ -1,16 +1,14 @@
1
1
  export { createHttpProxyAgent, createHttpsProxyAgent, resolveProxyUrl, } from '../proxy/proxy-resolution';
2
2
  export { installGlobalProxyAgent } from './http-proxy';
3
3
  export { configureGlobalAxiosDefaults } from './axios/config';
4
- export { tryParseUrl } from './axios/utils';
5
- export { httpRequest, removeEmptyBody } from './axios/request';
4
+ export { isFormDataInstance, tryParseUrl } from './axios/utils';
5
+ export { removeEmptyBody } from './axios/request';
6
6
  export { parseIncomingMessage } from './parse-incoming-message';
7
7
  export { binaryToBuffer, streamToBuffer } from './binary-buffer';
8
8
  export { binaryToString } from './binary-string';
9
- export type { NodeAgentOptions, ProxyOption, ProxyUrl, SsrfOption } from './node-agents';
10
- export type { CustomFetch, RequestAuthorizer } from './undici/transport';
11
- export { OutboundHttp, type HttpRequestClient, type HttpTransport, type HttpTransportOptions, type TypedHttpFullResponse, } from './outbound-http';
12
- export { markNonRetryable, retryabilityFromError, type Retryability } from './retryability';
13
- export { httpStatusFromError, isAxiosError, isConnectionRefusedError, isDnsFailure, isHttpRequestError, isTransportFailure, markHttpRequestError, type HttpRequestError, } from './client-request-error';
14
- export type { HttpRequestDefaultHeaders } from './client-default-headers';
9
+ export type { UseDefaultSsrfPolicy } from './use-default-ssrf-policy';
10
+ export type { CustomFetch } from './undici/transport';
11
+ export { OutboundHttp, type HttpRequestClient, type HttpTransport } from './outbound-http';
12
+ export { markNonRetryable, retryabilityFromError } from './retryability';
13
+ export { httpStatusFromError, isAxiosError, isConnectionRefusedError, isDnsFailure, isHttpRequestError, isTransportFailure, markHttpRequestError, } from './client-request-error';
15
14
  export type { HttpRequestClientOptions } from './client-options';
16
- export type { LegacyRequestCallbacks } from './legacy-request';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.markHttpRequestError = exports.isTransportFailure = exports.isHttpRequestError = exports.isDnsFailure = exports.isConnectionRefusedError = exports.isAxiosError = exports.httpStatusFromError = exports.retryabilityFromError = exports.markNonRetryable = exports.OutboundHttp = exports.binaryToString = exports.streamToBuffer = exports.binaryToBuffer = exports.parseIncomingMessage = exports.removeEmptyBody = exports.httpRequest = exports.tryParseUrl = exports.configureGlobalAxiosDefaults = exports.installGlobalProxyAgent = exports.resolveProxyUrl = exports.createHttpsProxyAgent = exports.createHttpProxyAgent = void 0;
3
+ exports.markHttpRequestError = exports.isTransportFailure = exports.isHttpRequestError = exports.isDnsFailure = exports.isConnectionRefusedError = exports.isAxiosError = exports.httpStatusFromError = exports.retryabilityFromError = exports.markNonRetryable = exports.OutboundHttp = exports.binaryToString = exports.streamToBuffer = exports.binaryToBuffer = exports.parseIncomingMessage = exports.removeEmptyBody = exports.tryParseUrl = exports.isFormDataInstance = exports.configureGlobalAxiosDefaults = exports.installGlobalProxyAgent = exports.resolveProxyUrl = exports.createHttpsProxyAgent = exports.createHttpProxyAgent = void 0;
4
4
  var proxy_resolution_1 = require("../proxy/proxy-resolution");
5
5
  Object.defineProperty(exports, "createHttpProxyAgent", { enumerable: true, get: function () { return proxy_resolution_1.createHttpProxyAgent; } });
6
6
  Object.defineProperty(exports, "createHttpsProxyAgent", { enumerable: true, get: function () { return proxy_resolution_1.createHttpsProxyAgent; } });
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "installGlobalProxyAgent", { enumerable: true, ge
10
10
  var config_1 = require("./axios/config");
11
11
  Object.defineProperty(exports, "configureGlobalAxiosDefaults", { enumerable: true, get: function () { return config_1.configureGlobalAxiosDefaults; } });
12
12
  var utils_1 = require("./axios/utils");
13
+ Object.defineProperty(exports, "isFormDataInstance", { enumerable: true, get: function () { return utils_1.isFormDataInstance; } });
13
14
  Object.defineProperty(exports, "tryParseUrl", { enumerable: true, get: function () { return utils_1.tryParseUrl; } });
14
15
  var request_1 = require("./axios/request");
15
- Object.defineProperty(exports, "httpRequest", { enumerable: true, get: function () { return request_1.httpRequest; } });
16
16
  Object.defineProperty(exports, "removeEmptyBody", { enumerable: true, get: function () { return request_1.removeEmptyBody; } });
17
17
  var parse_incoming_message_1 = require("./parse-incoming-message");
18
18
  Object.defineProperty(exports, "parseIncomingMessage", { enumerable: true, get: function () { return parse_incoming_message_1.parseIncomingMessage; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":";;;AAAA,8DAImC;AAHlC,wHAAA,oBAAoB,OAAA;AACpB,yHAAA,qBAAqB,OAAA;AACrB,mHAAA,eAAe,OAAA;AAEhB,2CAAuD;AAA9C,qHAAA,uBAAuB,OAAA;AAChC,yCAA8D;AAArD,sHAAA,4BAA4B,OAAA;AACrC,uCAA4C;AAAnC,oGAAA,WAAW,OAAA;AACpB,2CAA+D;AAAtD,sGAAA,WAAW,OAAA;AAAE,0GAAA,eAAe,OAAA;AACrC,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,iDAAiE;AAAxD,+GAAA,cAAc,OAAA;AAAE,+GAAA,cAAc,OAAA;AACvC,iDAAiD;AAAxC,+GAAA,cAAc,OAAA;AAGvB,iDAMyB;AALxB,6GAAA,YAAY,OAAA;AAMb,+CAA4F;AAAnF,gHAAA,gBAAgB,OAAA;AAAE,qHAAA,qBAAqB,OAAA;AAChD,+DASgC;AAR/B,2HAAA,mBAAmB,OAAA;AACnB,oHAAA,YAAY,OAAA;AACZ,gIAAA,wBAAwB,OAAA;AACxB,oHAAA,YAAY,OAAA;AACZ,0HAAA,kBAAkB,OAAA;AAClB,0HAAA,kBAAkB,OAAA;AAClB,4HAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":";;;AAAA,8DAImC;AAHlC,wHAAA,oBAAoB,OAAA;AACpB,yHAAA,qBAAqB,OAAA;AACrB,mHAAA,eAAe,OAAA;AAEhB,2CAAuD;AAA9C,qHAAA,uBAAuB,OAAA;AAChC,yCAA8D;AAArD,sHAAA,4BAA4B,OAAA;AACrC,uCAAgE;AAAvD,2GAAA,kBAAkB,OAAA;AAAE,oGAAA,WAAW,OAAA;AACxC,2CAAkD;AAAzC,0GAAA,eAAe,OAAA;AACxB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,iDAAiE;AAAxD,+GAAA,cAAc,OAAA;AAAE,+GAAA,cAAc,OAAA;AACvC,iDAAiD;AAAxC,+GAAA,cAAc,OAAA;AAGvB,iDAA2F;AAAlF,6GAAA,YAAY,OAAA;AACrB,+CAAyE;AAAhE,gHAAA,gBAAgB,OAAA;AAAE,qHAAA,qBAAqB,OAAA;AAChD,+DAQgC;AAP/B,2HAAA,mBAAmB,OAAA;AACnB,oHAAA,YAAY,OAAA;AACZ,gIAAA,wBAAwB,OAAA;AACxB,oHAAA,YAAY,OAAA;AACZ,0HAAA,kBAAkB,OAAA;AAClB,0HAAA,kBAAkB,OAAA;AAClB,4HAAA,oBAAoB,OAAA"}
@@ -1,4 +1,5 @@
1
1
  import { Logger } from '@n8n/backend-common';
2
+ import { SsrfProtectionConfig } from '@n8n/config';
2
3
  import type { IHttpRequestOptions, IN8nHttpFullResponse, IN8nHttpResponse, IRequestOptions } from 'n8n-workflow';
3
4
  import type http from 'node:http';
4
5
  import type https from 'node:https';
@@ -7,11 +8,12 @@ import type { Dispatcher } from 'undici';
7
8
  import { SsrfProtectionService } from '../ssrf';
8
9
  import { HttpRequestClientOptions } from './client-options';
9
10
  import { type LegacyRequestCallbacks } from './legacy-request';
10
- import type { NodeAgentOptions, ProxyOption, SsrfOption } from './node-agents';
11
+ import type { NodeAgentOptions, ProxyOption } from './node-agents';
11
12
  import { type CustomFetch, type RequestAuthorizer, type TransportTimeoutOptions } from './undici/transport';
13
+ import type { UseDefaultSsrfPolicy } from './use-default-ssrf-policy';
12
14
  export interface HttpTransportOptions {
13
15
  proxy?: ProxyOption;
14
- ssrf?: SsrfOption;
16
+ useDefaultSsrfPolicy?: UseDefaultSsrfPolicy;
15
17
  timeouts?: TransportTimeoutOptions;
16
18
  authorize?: RequestAuthorizer;
17
19
  }
@@ -38,8 +40,10 @@ export interface HttpTransport {
38
40
  }
39
41
  export declare class OutboundHttp {
40
42
  private readonly ssrfProtection;
43
+ private readonly ssrfConfig;
41
44
  private readonly logger;
42
- constructor(ssrfProtection: SsrfProtectionService, logger: Logger);
45
+ constructor(ssrfProtection: SsrfProtectionService, ssrfConfig: SsrfProtectionConfig, logger: Logger);
43
46
  requests(options?: HttpRequestClientOptions): HttpRequestClient;
44
47
  transport(options?: HttpTransportOptions): HttpTransport;
48
+ private resolveSsrf;
45
49
  }
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.OutboundHttp = void 0;
13
13
  const backend_common_1 = require("@n8n/backend-common");
14
+ const config_1 = require("@n8n/config");
14
15
  const di_1 = require("@n8n/di");
15
16
  const ssrf_1 = require("../ssrf");
16
17
  const request_1 = require("./axios/request");
@@ -20,12 +21,13 @@ const legacy_request_1 = require("./legacy-request");
20
21
  const node_agents_1 = require("./node-agents");
21
22
  const transport_1 = require("./undici/transport");
22
23
  let OutboundHttp = class OutboundHttp {
23
- constructor(ssrfProtection, logger) {
24
+ constructor(ssrfProtection, ssrfConfig, logger) {
24
25
  this.ssrfProtection = ssrfProtection;
26
+ this.ssrfConfig = ssrfConfig;
25
27
  this.logger = logger;
26
28
  }
27
29
  requests(options) {
28
- const ssrf = options?.ssrf ?? this.ssrfProtection;
30
+ const ssrf = this.resolveSsrf(options?.useDefaultSsrfPolicy);
29
31
  const ssrfBridge = ssrf === 'disabled' ? undefined : ssrf;
30
32
  const applyDefaults = (requestOptions) => (0, client_default_headers_1.withClientDefaults)(requestOptions, options?.baseURL, options?.headers, options?.timeout);
31
33
  async function request(requestOptions) {
@@ -50,7 +52,7 @@ let OutboundHttp = class OutboundHttp {
50
52
  }
51
53
  transport(options) {
52
54
  const proxy = options?.proxy ?? 'env';
53
- const ssrf = options?.ssrf ?? this.ssrfProtection;
55
+ const ssrf = this.resolveSsrf(options?.useDefaultSsrfPolicy);
54
56
  const timeouts = options?.timeouts;
55
57
  const authorize = options?.authorize;
56
58
  const dispatcherTransport = (0, transport_1.createDispatcherTransport)({ proxy, ssrf, timeouts, authorize });
@@ -61,11 +63,20 @@ let OutboundHttp = class OutboundHttp {
61
63
  getNodeAgent: (agentOptions) => agentOptions !== undefined ? (0, node_agents_1.buildNodeAgents)(proxy, ssrf, agentOptions) : lazyNodeAgents(),
62
64
  };
63
65
  }
66
+ resolveSsrf(useDefaultSsrfPolicy = 'safe') {
67
+ if (useDefaultSsrfPolicy === 'enforced') {
68
+ return this.ssrfProtection;
69
+ }
70
+ if (useDefaultSsrfPolicy === 'unsafe' || !this.ssrfConfig.enabled) {
71
+ return 'disabled';
72
+ }
73
+ return this.ssrfProtection;
74
+ }
64
75
  };
65
76
  exports.OutboundHttp = OutboundHttp;
66
77
  exports.OutboundHttp = OutboundHttp = __decorate([
67
78
  (0, di_1.Service)(),
68
- __metadata("design:paramtypes", [ssrf_1.SsrfProtectionService, backend_common_1.Logger])
79
+ __metadata("design:paramtypes", [ssrf_1.SsrfProtectionService, config_1.SsrfProtectionConfig, backend_common_1.Logger])
69
80
  ], OutboundHttp);
70
81
  function lazy(factory) {
71
82
  let cached;
@@ -1 +1 @@
1
- {"version":3,"file":"outbound-http.js","sourceRoot":"","sources":["../../src/http/outbound-http.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,gCAAkC;AAYlC,kCAAgD;AAChD,6CAA8C;AAC9C,qEAA8D;AAE9D,iEAA8D;AAC9D,qDAAqF;AAErF,+CAAgD;AAChD,kDAK4B;AA0IrB,IAAM,YAAY,GAAlB,MAAM,YAAY;IACxB,YACkB,cAAqC,EACrC,MAAc;8BADd,cAAc;sBACd,MAAM;IACrB,CAAC;IAMJ,QAAQ,CAAC,OAAkC;QAC1C,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC;QAClD,MAAM,UAAU,GAAG,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;QAE1D,MAAM,aAAa,GAAG,CAAC,cAAmC,EAAuB,EAAE,CAClF,IAAA,2CAAkB,EAAC,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAW1F,KAAK,UAAU,OAAO,CAAC,cAAmC;YACzD,IAAI,CAAC;gBACJ,OAAO,MAAM,IAAA,qBAAW,EAAC,aAAa,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;YACrE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAEhB,MAAM,IAAA,2CAAoB,EAAC,KAAK,CAAC,CAAC;YACnC,CAAC;QACF,CAAC;QAED,OAAO;YACN,OAAO;YACP,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE;gBAClD,IAAI,CAAC;oBACJ,OAAO,MAAM,IAAA,qCAAoB,EAAC,cAAc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;YACnE,OAAO,UAAU,CAAC;QACnB,CAAC;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;CACD,CAAA;;uBAtFY,YAAY;IADxB,IAAA,YAAO,GAAE;qCAGyB,4BAAqB,EACzB,6BAAoB,EACxB,uBAAM;GAJpB,YAAY,CAsFxB;AAED,SAAS,IAAI,CAAI,OAAgB;IAChC,IAAI,MAAgC,CAAC;IACrC,OAAO,GAAG,EAAE,CAAC,CAAC,MAAM,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;AACtD,CAAC"}
@@ -0,0 +1 @@
1
+ export type UseDefaultSsrfPolicy = 'safe' | 'enforced' | 'unsafe';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=use-default-ssrf-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-default-ssrf-policy.js","sourceRoot":"","sources":["../../src/http/use-default-ssrf-policy.ts"],"names":[],"mappings":""}
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { convertN8nRequestToAxios } from './http/axios/request';
1
+ export { convertN8nRequestToAxios, httpRequest } from './http/axios/request';
2
+ export { uninstallGlobalProxyAgent } from './http/http-proxy';
2
3
  export { generateContentLengthHeader, isFormDataInstance } from './http/axios/utils';
3
4
  export { buildRfcStyleUserAgent, getDefaultN8nOutboundUserAgent } from './http/axios/user-agent';
4
5
  export { startServer, type LocalServer } from './http/local-server';
package/dist/testing.js CHANGED
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFakeOutboundHttp = exports.startServer = exports.getDefaultN8nOutboundUserAgent = exports.buildRfcStyleUserAgent = exports.isFormDataInstance = exports.generateContentLengthHeader = exports.convertN8nRequestToAxios = void 0;
3
+ exports.createFakeOutboundHttp = exports.startServer = exports.getDefaultN8nOutboundUserAgent = exports.buildRfcStyleUserAgent = exports.isFormDataInstance = exports.generateContentLengthHeader = exports.uninstallGlobalProxyAgent = exports.httpRequest = exports.convertN8nRequestToAxios = void 0;
4
4
  var request_1 = require("./http/axios/request");
5
5
  Object.defineProperty(exports, "convertN8nRequestToAxios", { enumerable: true, get: function () { return request_1.convertN8nRequestToAxios; } });
6
+ Object.defineProperty(exports, "httpRequest", { enumerable: true, get: function () { return request_1.httpRequest; } });
7
+ var http_proxy_1 = require("./http/http-proxy");
8
+ Object.defineProperty(exports, "uninstallGlobalProxyAgent", { enumerable: true, get: function () { return http_proxy_1.uninstallGlobalProxyAgent; } });
6
9
  var utils_1 = require("./http/axios/utils");
7
10
  Object.defineProperty(exports, "generateContentLengthHeader", { enumerable: true, get: function () { return utils_1.generateContentLengthHeader; } });
8
11
  Object.defineProperty(exports, "isFormDataInstance", { enumerable: true, get: function () { return utils_1.isFormDataInstance; } });
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":";;;AAQA,gDAAgE;AAAvD,mHAAA,wBAAwB,OAAA;AACjC,4CAAqF;AAA5E,oHAAA,2BAA2B,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AACxD,sDAAiG;AAAxF,oHAAA,sBAAsB,OAAA;AAAE,4HAAA,8BAA8B,OAAA;AAC/D,oDAAoE;AAA3D,2GAAA,WAAW,OAAA;AACpB,gEAImC;AAHlC,4HAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":";;;AAQA,gDAA6E;AAApE,mHAAA,wBAAwB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAC9C,gDAA8D;AAArD,uHAAA,yBAAyB,OAAA;AAClC,4CAAqF;AAA5E,oHAAA,2BAA2B,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AACxD,sDAAiG;AAAxF,oHAAA,sBAAsB,OAAA;AAAE,4HAAA,8BAA8B,OAAA;AAC/D,oDAAoE;AAA3D,2GAAA,WAAW,OAAA;AACpB,gEAImC;AAHlC,4HAAA,sBAAsB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/backend-network",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "src/index.ts",
6
6
  "types": "dist/index.d.ts",
@@ -41,8 +41,8 @@
41
41
  },
42
42
  "files": [
43
43
  "dist/**/*",
44
- "LICENSE.md",
45
- "LICENSE_EE.md"
44
+ "LICENSE_EE.md",
45
+ "LICENSE.md"
46
46
  ],
47
47
  "dependencies": {
48
48
  "axios": "1.18.0",
@@ -56,12 +56,12 @@
56
56
  "reflect-metadata": "0.2.2",
57
57
  "undici": "^7.29.0",
58
58
  "zod": "3.25.76",
59
- "@n8n/backend-common": "1.37.0",
60
- "@n8n/config": "2.35.0",
61
- "@n8n/constants": "0.36.0",
59
+ "@n8n/config": "2.36.0",
60
+ "@n8n/constants": "0.37.0",
61
+ "@n8n/utils": "1.46.0",
62
+ "n8n-workflow": "2.38.0",
62
63
  "@n8n/di": "0.16.0",
63
- "@n8n/utils": "1.45.0",
64
- "n8n-workflow": "2.37.0"
64
+ "@n8n/backend-common": "1.38.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/proxy-from-env": "^1.0.4",
@@ -71,8 +71,8 @@
71
71
  "typescript": "7.0.2",
72
72
  "vitest": "^4.1.9",
73
73
  "vitest-mock-extended": "^3.1.0",
74
- "@n8n/typescript-config": "1.10.0",
75
- "@n8n/vitest-config": "1.21.0"
74
+ "@n8n/vitest-config": "1.21.0",
75
+ "@n8n/typescript-config": "1.11.0"
76
76
  },
77
77
  "license": "SEE LICENSE IN LICENSE.md",
78
78
  "homepage": "https://n8n.io",