Skip to content

Commit

Permalink
fix:: README + small lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePresman committed Nov 15, 2023
1 parent b9fdd6d commit 8e8dc98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ 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>`
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.

Expand Down Expand Up @@ -103,7 +102,6 @@ proxy.register(require('@fastify/reply-from'), {
}
})
```

See undici own options for more configurations.

You can also pass the plugin a custom instance:
Expand Down Expand Up @@ -215,7 +213,7 @@ This only applies when a custom [`body`](#body) is not passed in. Defaults to:
On which methods should the connection be retried in case of socket hang up.
**Be aware** that setting here not idempotent method may lead to unexpected results on target.

By default: `['GET', 'HEAD', 'OPTIONS', 'TRACE', 'POST', 'PATCH']`
By default: `['GET', 'HEAD', 'OPTIONS', 'TRACE']`

This plugin will always retry on 503 errors, _unless_ `retryMethods` does not contain `GET`.

Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const {
UndiciSocketError,
InternalServerError
} = require('./lib/errors')
const { warn } = require('node:console')

const fastifyReplyFrom = fp(function from (fastify, opts, next) {
const contentTypesToEncode = new Set([
Expand Down

0 comments on commit 8e8dc98

Please sign in to comment.