Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/reply-from

Package Overview
Dependencies
Maintainers
17
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/reply-from - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

2

index.js

@@ -169,3 +169,3 @@ 'use strict'

if (isFastifyMultipartRegistered(fastify)) {
fastify.log.warn('fastify-reply-from might not behave as expected when used with fastify-multipart')
fastify.log.warn('@fastify/reply-from might not behave as expected when used with @fastify/multipart')
}

@@ -172,0 +172,0 @@ done()

{
"name": "@fastify/reply-from",
"version": "7.0.0",
"version": "7.0.1",
"description": "forward your HTTP request to another server, for fastify",

@@ -34,2 +34,4 @@ "main": "index.js",

"devDependencies": {
"@fastify/formbody": "^6.0.0",
"@fastify/multipart": "^6.0.0",
"@sinonjs/fake-timers": "^9.0.0",

@@ -39,4 +41,2 @@ "@types/node": "^17.0.0",

"fastify": "^3.17.0",
"fastify-formbody": "^5.0.0",
"fastify-multipart": "^5.0.0",
"form-data": "^4.0.0",

@@ -43,0 +43,0 @@ "got": "^11.8.2",

@@ -1,5 +0,5 @@

# fastify-reply-from
# @fastify/reply-from
![CI](https://github.com/fastify/fastify-reply-from/workflows/CI/badge.svg)
[![NPM version](https://img.shields.io/npm/v/fastify-reply-from.svg?style=flat)](https://www.npmjs.com/package/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)

@@ -15,7 +15,7 @@ [![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)

```
npm i fastify-reply-from
npm i @fastify/reply-from
```
## Compatibility with fastify-multipart
`fastify-reply-from` and [`fastify-multipart`](https://github.com/fastify/fastify-multipart) should not be registered as sibling plugins nor should they be registered in plugins which have a parent-child relationship.<br> The two plugins are incompatible, in the sense that the behavior of `fastify-reply-from` might not be the expected one when the above-mentioned conditions are not respected.<br> This is due to the fact that `fastify-multipart` consumes the multipart content by parsing it, hence this content is not forwarded to the target service by `fastify-reply-from`.<br>
## Compatibility with @fastify/multipart
`@fastify/reply-from` and [`@fastify/multipart`](https://github.com/fastify/fastify-multipart) should not be registered as sibling plugins nor should they be registered in plugins which have a parent-child relationship.<br> The two plugins are incompatible, in the sense that the behavior of `@fastify/reply-from` might not be the expected one when the above-mentioned conditions are not respected.<br> This is due to the fact that `@fastify/multipart` consumes the multipart content by parsing it, hence this content is not forwarded to the target service by `@fastify/reply-from`.<br>
However, the two plugins may be used within the same fastify instance, at the condition that they belong to disjoint branches of the fastify plugins hierarchy tree.

@@ -45,3 +45,3 @@

proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/'

@@ -82,3 +82,3 @@ })

const socketPath = require('querystring').escape('/run/http-daemon.socket')
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'unix+http://${socketPath}/'

@@ -97,3 +97,3 @@ });

```js
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/',

@@ -116,3 +116,3 @@ // default settings

```js
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/',

@@ -132,3 +132,3 @@ undici: new undici.Pool('http://localhost:3001')

```js
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/',

@@ -148,3 +148,3 @@ http: {

```js
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/',

@@ -170,3 +170,3 @@ http: {

```js
proxy.register(require('fastify-reply-from'), {
proxy.register(require('@fastify/reply-from'), {
base: 'http://localhost:3001/',

@@ -312,3 +312,3 @@ http2: {

### Combining with [fastify-formbody](https://github.com/fastify/fastify-formbody)
### Combining with [@fastify/formbody](https://github.com/fastify/fastify-formbody)

@@ -315,0 +315,0 @@ `formbody` expects the body to be returned as a string and not an object.

@@ -8,3 +8,3 @@ 'use strict'

const From = require('..')
const Multipart = require('fastify-multipart')
const Multipart = require('@fastify/multipart')
const http = require('http')

@@ -66,3 +66,3 @@ const get = require('simple-get').concat

log.level === 40 &&
log.msg.match(/fastify-reply-from might not behave as expected when used with fastify-multipart/)
log.msg.match(/@fastify\/reply-from might not behave as expected when used with @fastify\/multipart/)
) {

@@ -69,0 +69,0 @@ t.pass('incompatibility warn message logged')

@@ -13,3 +13,3 @@ 'use strict'

})
instance.register(require('fastify-formbody'))
instance.register(require('@fastify/formbody'))

@@ -16,0 +16,0 @@ t.plan(9)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc