Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "proxy"

Index

Functions

Functions

proxy

  • 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 Opine 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. Internally this is achieved by calling the Opine next() method to delegate to the next Opine middleware.

    Parameters

    Returns handleProxy

    Opine proxy middleware

Generated using TypeDoc