import { proxy } from "https://deno.land/x/oak_http_proxy@2.3.0/src/proxy.ts";
Takes a url argument that can be a string, URL or a function that returns one of the previous to proxy requests to. The remaining path from a request that has not been matched by Oak will be appended to the provided url when making the proxy request.
Also accepts optional options configuration allowing the user to modified all aspects of proxied request via option properties or a series of hooks allowing decoration of the outbound request and the inbound response objects.
Requests and responses can also be filtered via the filterReq
and filterRes
function options, allowing requests to bypass
the proxy.
Parameters
url: string | URL | ProxyUrlFunction
optional
options: ProxyOptions = [UNSUPPORTED]