@fastify/reply-from
Advanced tools
Comparing version 9.0.2 to 9.1.0
@@ -42,3 +42,4 @@ 'use strict' | ||
undici: opts.undici, | ||
globalAgent: opts.globalAgent | ||
globalAgent: opts.globalAgent, | ||
destroyAgent: opts.destroyAgent | ||
}) | ||
@@ -45,0 +46,0 @@ if (requestBuilt instanceof Error) { |
@@ -45,2 +45,3 @@ 'use strict' | ||
const globalAgent = opts.globalAgent | ||
const destroyAgent = opts.destroyAgent | ||
let http2Client | ||
@@ -89,3 +90,3 @@ let undiciAgent | ||
function close () { | ||
if (globalAgent) { | ||
if (globalAgent || destroyAgent === false) { | ||
return | ||
@@ -92,0 +93,0 @@ } |
{ | ||
"name": "@fastify/reply-from", | ||
"version": "9.0.2", | ||
"version": "9.1.0", | ||
"description": "forward your HTTP request to another server, for fastify", | ||
@@ -44,2 +44,3 @@ "main": "index.js", | ||
"proxyquire": "^2.1.3", | ||
"semver": "^7.5.1", | ||
"simple-get": "^4.0.1", | ||
@@ -46,0 +47,0 @@ "snazzy": "^9.0.0", |
@@ -249,2 +249,11 @@ # @fastify/reply-from | ||
#### `destoryAgent` | ||
If set to `true`, it will destory all agents when the Fastify is closed. | ||
If set to `false`, it will not destroy the agents. | ||
By Default: `false` | ||
--- | ||
#### `maxRetriesOn503` | ||
@@ -251,0 +260,0 @@ |
@@ -8,3 +8,9 @@ 'use strict' | ||
const get = require('simple-get').concat | ||
const semver = require('semver') | ||
if (semver.gte(process.version, '20.2.0')) { | ||
t.comment('skip this test on node >= 20.2.0 as it is current broken') | ||
process.exit(0) | ||
} | ||
const instance = Fastify() | ||
@@ -11,0 +17,0 @@ |
@@ -97,2 +97,3 @@ /// <reference types="node" /> | ||
globalAgent?: boolean; | ||
destroyAgent?: boolean; | ||
} | ||
@@ -99,0 +100,0 @@ |
@@ -48,2 +48,3 @@ import replyFrom, { FastifyReplyFromOptions } from ".."; | ||
globalAgent: false, | ||
destroyAgent: true | ||
}; | ||
@@ -50,0 +51,0 @@ tap.autoend(false); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
175502
104
5152
436
20