The filter request option can be used to limit what requests are proxied.
Return false to continue to execute the proxy; return true to skip the proxy for this request.
The filter response option can be used to limit what responses are used from the proxy.
Return false to continue to execute the proxy; return true to skip the proxy for this request.
Configure whether the proxy URL should be memoized for subsequent requests.
If you are using the function form of the URL and require it to be executed on every request then this should be set to false.
True by default.
The memoized url set on first request and used internally if
memoizeUrl
is set to true.
Configure the HTTP method (verb) used for the outbound proxied request. If not provided the current request method is used.
Configure whether the request body should be parsed and used on proxied requests.
True by default.
Configure whether the "Host" header should be preserved on proxied requests.
Provide a custom error handling for failed proxied requests.
Decorate the outbound proxied request initialization options.
This configuration will be used within the fetch
method internally
to make the request to the provided url.
Decorate the outbound proxied request url.
Configure whether the request body should be sent as a UInt8Array buffer.
The request body encoding to use. Only "utf-8" currently supported.
Configure whether the outbound proxied request should be over
HTTPS. This will always override the protocol produced by the provided
proxy URL if set to true
.
Decorate the inbound response object from the proxied request.
Decorate the inbound response headers from the proxied request.
Configure a timeout in ms for the outbound proxied request. If not provided the request will never time out.
Generated using TypeDoc
Interface for the proxy options which allow the user to filter, customize and decorate proxied requests and responses.