diff options
author | Gar <gar+gh@danger.computer> | 2021-08-24 18:57:41 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-08-24 18:57:41 +0300 |
commit | e3878536f3612d9ddc3002c126cfa9a91021c7db (patch) | |
tree | d11f9e0e36fe60367e0dd0e26c28437e4216c112 /node_modules | |
parent | 9b0c0344ed1109eaab4dcfade7e33f523ec8ff67 (diff) |
make-fetch-happen@9.1.0
* fix: use the same strictSSL default as tls.connect
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/make-fetch-happen/lib/agent.js | 6 | ||||
-rw-r--r-- | node_modules/make-fetch-happen/lib/options.js | 5 | ||||
-rw-r--r-- | node_modules/make-fetch-happen/package.json | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/node_modules/make-fetch-happen/lib/agent.js b/node_modules/make-fetch-happen/lib/agent.js index 873d69cf4..3675dd8ae 100644 --- a/node_modules/make-fetch-happen/lib/agent.js +++ b/node_modules/make-fetch-happen/lib/agent.js @@ -33,7 +33,7 @@ function getAgent (uri, opts) { ? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}` : '>no-proxy<', `local-address:${opts.localAddress || '>no-local-address<'}`, - `strict-ssl:${isHttps ? !!opts.strictSSL : '>no-strict-ssl<'}`, + `strict-ssl:${isHttps ? opts.rejectUnauthorized : '>no-strict-ssl<'}`, `ca:${(isHttps && opts.ca) || '>no-ca<'}`, `cert:${(isHttps && opts.cert) || '>no-cert<'}`, `key:${(isHttps && opts.key) || '>no-key<'}`, @@ -72,7 +72,7 @@ function getAgent (uri, opts) { cert: opts.cert, key: opts.key, localAddress: opts.localAddress, - rejectUnauthorized: opts.strictSSL, + rejectUnauthorized: opts.rejectUnauthorized, timeout: agentTimeout, }) : new HttpAgent({ maxSockets: agentMaxSockets, @@ -173,7 +173,7 @@ function getProxy (proxyUrl, opts, isHttps) { timeout: getAgentTimeout(opts.timeout), localAddress: opts.localAddress, maxSockets: getMaxSockets(opts.maxSockets), - rejectUnauthorized: opts.strictSSL, + rejectUnauthorized: opts.rejectUnauthorized, } if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') { diff --git a/node_modules/make-fetch-happen/lib/options.js b/node_modules/make-fetch-happen/lib/options.js index 088917548..f6138e6e1 100644 --- a/node_modules/make-fetch-happen/lib/options.js +++ b/node_modules/make-fetch-happen/lib/options.js @@ -7,10 +7,9 @@ const conditionalHeaders = [ ] const configureOptions = (opts) => { - const options = { ...opts } + const {strictSSL, ...options} = { ...opts } options.method = options.method ? options.method.toUpperCase() : 'GET' - if (Object.prototype.hasOwnProperty.call(options, 'strictSSL')) - options.rejectUnauthorized = options.strictSSL + options.rejectUnauthorized = strictSSL !== false if (!options.retry) options.retry = { retries: 0 } diff --git a/node_modules/make-fetch-happen/package.json b/node_modules/make-fetch-happen/package.json index 013156756..dae7b37da 100644 --- a/node_modules/make-fetch-happen/package.json +++ b/node_modules/make-fetch-happen/package.json @@ -1,6 +1,6 @@ { "name": "make-fetch-happen", - "version": "9.0.5", + "version": "9.1.0", "description": "Opinionated, caching, retrying fetch client", "main": "lib/index.js", "files": [ |