@fastify/reply-from
Advanced tools
Comparing version 8.0.0 to 8.1.0
@@ -94,2 +94,3 @@ /// <reference types="node" /> | ||
maxRetriesOn503?: number; | ||
disableRequestLogging?: boolean; | ||
} | ||
@@ -96,0 +97,0 @@ |
10
index.js
@@ -36,2 +36,3 @@ 'use strict' | ||
}) | ||
const disableRequestLogging = opts.disableRequestLogging || false | ||
@@ -124,3 +125,3 @@ fastify.decorateReply('from', function (source, opts) { | ||
this.request.log.info({ source }, 'fetching from remote server') | ||
!disableRequestLogging && this.request.log.info({ source }, 'fetching from remote server') | ||
@@ -150,3 +151,3 @@ const requestHeaders = rewriteRequestHeaders(req, headers) | ||
} | ||
this.request.log.info('response received') | ||
!disableRequestLogging && this.request.log.info('response received') | ||
if (sourceHttp2) { | ||
@@ -185,3 +186,6 @@ copyHeaders( | ||
next() | ||
}, '4.x') | ||
}, { | ||
fastify: '4.x', | ||
name: '@fastify/reply-from' | ||
}) | ||
@@ -188,0 +192,0 @@ function getQueryString (search, reqUrl, opts) { |
{ | ||
"name": "@fastify/reply-from", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"description": "forward your HTTP request to another server, for fastify", | ||
@@ -29,36 +29,33 @@ "main": "index.js", | ||
}, | ||
"engines": { | ||
"node": ">=12.18" | ||
}, | ||
"homepage": "https://github.com/fastify/fastify-reply-from#readme", | ||
"devDependencies": { | ||
"@fastify/formbody": "^7.0.0", | ||
"@fastify/multipart": "^7.0.0", | ||
"@sinonjs/fake-timers": "^9.0.0", | ||
"@types/node": "^17.0.0", | ||
"@types/tap": "^15.0.3", | ||
"fastify": "^4.0.0-rc.2", | ||
"@fastify/formbody": "^7.0.1", | ||
"@fastify/multipart": "^7.1.0", | ||
"@sinonjs/fake-timers": "^9.1.2", | ||
"@types/node": "^18.0.0", | ||
"@types/tap": "^15.0.7", | ||
"fastify": "^4.0.2", | ||
"form-data": "^4.0.0", | ||
"got": "^11.8.2", | ||
"h2url": "^0.2.0", | ||
"msgpack5": "^6.0.0", | ||
"nock": "^13.1.0", | ||
"msgpack5": "^6.0.1", | ||
"nock": "^13.2.6", | ||
"pre-commit": "^1.2.2", | ||
"proxyquire": "^2.1.3", | ||
"simple-get": "^4.0.0", | ||
"simple-get": "^4.0.1", | ||
"snazzy": "^9.0.0", | ||
"split2": "^4.0.0", | ||
"split2": "^4.1.0", | ||
"standard": "^17.0.0", | ||
"tap": "^16.0.0", | ||
"tsd": "^0.20.0", | ||
"typescript": "^4.3.2" | ||
"tap": "^16.2.0", | ||
"tsd": "^0.21.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"dependencies": { | ||
"end-of-stream": "^1.4.4", | ||
"fastify-plugin": "^3.0.0", | ||
"fastify-plugin": "^3.0.1", | ||
"http-errors": "^2.0.0", | ||
"pump": "^3.0.0", | ||
"semver": "^7.3.5", | ||
"tiny-lru": "^8.0.1", | ||
"undici": "^5.0.0" | ||
"semver": "^7.3.7", | ||
"tiny-lru": "^8.0.2", | ||
"undici": "^5.5.1" | ||
}, | ||
@@ -65,0 +62,0 @@ "tsd": { |
@@ -5,4 +5,2 @@ # @fastify/reply-from | ||
[![NPM version](https://img.shields.io/npm/v/@fastify/reply-from.svg?style=flat)](https://www.npmjs.com/package/@fastify/reply-from) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-reply-from/badge.svg)](https://snyk.io/test/github/fastify/fastify-reply-from) | ||
[![Coverage Status](https://coveralls.io/repos/github/fastify/fastify-reply-from/badge.svg?branch=master)](https://coveralls.io/github/fastify/fastify-reply-from?branch=master) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) | ||
@@ -179,2 +177,15 @@ | ||
#### `disableRequestLogging` | ||
By default package will issue log messages when a request is received. By setting this option to true, these log messages will be disabled. | ||
Default for `disableRequestLogging` will be `false`. To disable the log messages set `disableRequestLogging` to `true`. | ||
```js | ||
proxy.register(require('@fastify/reply-from'), { | ||
base: 'http://localhost:3001/', | ||
disableRequestLogging: true // request log messages will be disabled | ||
}) | ||
``` | ||
#### `cacheURLs` | ||
@@ -181,0 +192,0 @@ |
@@ -47,2 +47,3 @@ import replyFrom, { FastifyReplyFromOptions } from "../"; | ||
maxRetriesOn503: 10, | ||
disableRequestLogging: false, | ||
}; | ||
@@ -49,0 +50,0 @@ tap.autoend(false); |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
149943
89
4432
347
Updatedfastify-plugin@^3.0.1
Updatedsemver@^7.3.7
Updatedtiny-lru@^8.0.2
Updatedundici@^5.5.1