Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "proxy"

Index

Functions

Functions

proxy

  • proxy(url: string | URL | ProxyUrlFunction, options?: ProxyOptions): handleProxy
  • 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
    • Default value options: ProxyOptions = {}

    Returns handleProxy

    Oak proxy middleware

Generated using TypeDoc