import { type ProxyOptions } from "https://deno.land/x/oak_http_proxy@2.3.0/deps.ts";
Interface for the proxy options which allow the user to filter, customize and decorate proxied requests and responses.
Properties
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.
Provide a custom error handling for failed proxied requests.
Decorate the outbound proxied request url.
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 inbound response headers from the proxied 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 "Host" header should be preserved on proxied requests.
Configure whether the request body should be parsed and used on proxied requests.
True by default.
The request body encoding to use. Only "utf-8" currently supported.
Configure whether the request body should be sent as a UInt8Array buffer.
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 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
.
Configure a timeout in ms for the outbound proxied request. If not provided the request will never time out.
Configure the HTTP method (verb) used for the outbound proxied request. If not provided the current request method is used.