Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Set the base URL for all the forwarded requests.
*String or String[]*:

* **Single string** → a normal `undici.Pool` / `http.request` client is used.
* **Array with ≥ 2 elements** → **[`undici.BalancedPool`](https://undici.nodejs.org/#/docs/api/BalancedPool)** is automatically selected and requests are load-balanced round-robin across the given origins.
* **Array with ≥ 2 elements** → **[`undici.BalancedPool`](https://undici.nodejs.org/api/BalancedPool)** is automatically selected and requests are load-balanced round-robin across the given origins.

When you provide an array, only the *origin* (`protocol://host:port`) part of each URL is considered; any path component is ignored.

Expand Down Expand Up @@ -354,7 +354,7 @@ const customRetryLogic = ({req, res, err, getDefaultRetry}: RetryDetails) => {
### `reply.from(source, [opts])`

The plugin decorates the
[`Reply`](https://fastify.dev/docs/latest/Reference/Reply)
[`Reply`](https://fastify.dev/docs/latest/Reference/Reply/)
instance with a `from` method, which will reply to the original request
__from the desired source__. The options allows overrides of any part of
the request or response being sent or received to/from the source.
Expand Down Expand Up @@ -512,7 +512,7 @@ This library has:
- The default value for `requestTimeout` is 10 seconds (`10000`), a value of 0 disables the timeout.
- The default value for `sessionTimeout` is 60 seconds (`60000`), a value of 0 disables the timeout.

When a timeout happens, [`504 Gateway Timeout`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504)
When a timeout happens, [`504 Gateway Timeout`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/504)
will be returned to the client.

## Compatibility with @fastify/multipart
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const fastifyReplyFrom = fp(function from (fastify, opts, next) {
}
}

// according to https://tools.ietf.org/html/rfc2616#section-4.3
// according to https://datatracker.ietf.org/doc/html/rfc2616#section-4.3
// fastify ignore message body when it's a GET or HEAD request
// when proxy this request, we should reset the content-length to make it a valid http request
// discussion: https://github.com/fastify/fastify/issues/953
Expand Down
Loading