@@ -17,3 +17,3 @@ 'use strict' | ||
| const { kUrl } = require('../core/symbols') | ||
| const { parseOrigin } = require('../core/util') | ||
| const util = require('../core/util') | ||
| const kFactory = Symbol('factory') | ||
@@ -60,3 +60,6 @@ | ||
| this[kOptions] = opts | ||
| this[kOptions] = { ...util.deepClone(opts) } | ||
| this[kOptions].interceptors = opts.interceptors | ||
| ? { ...opts.interceptors } | ||
| : undefined | ||
| this[kIndex] = -1 | ||
@@ -81,3 +84,3 @@ this[kCurrentWeight] = 0 | ||
| addUpstream (upstream) { | ||
| const upstreamOrigin = parseOrigin(upstream).origin | ||
| const upstreamOrigin = util.parseOrigin(upstream).origin | ||
@@ -91,3 +94,3 @@ if (this[kClients].find((pool) => ( | ||
| } | ||
| const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) | ||
| const pool = this[kFactory](upstreamOrigin, this[kOptions]) | ||
@@ -132,3 +135,3 @@ this[kAddClient](pool) | ||
| removeUpstream (upstream) { | ||
| const upstreamOrigin = parseOrigin(upstream).origin | ||
| const upstreamOrigin = util.parseOrigin(upstream).origin | ||
@@ -149,3 +152,3 @@ const pool = this[kClients].find((pool) => ( | ||
| getUpstream (upstream) { | ||
| const upstreamOrigin = parseOrigin(upstream).origin | ||
| const upstreamOrigin = util.parseOrigin(upstream).origin | ||
@@ -152,0 +155,0 @@ return this[kClients].find((pool) => ( |
+1
-1
| { | ||
| "name": "undici", | ||
| "version": "7.24.0", | ||
| "version": "7.24.1", | ||
| "description": "An HTTP/1.1 client, written from scratch for Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://undici.nodejs.org", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1601125
0.01%34009
0.01%