Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpProxy

Handles the HTTP reverse proxy logic between the user agent and the origin.

Hierarchy

  • HttpProxy

Implements

  • any

Index

Methods

addInterceptor

  • Add an interceptor to the interceptor chain.

    Parameters

    Returns HttpProxy

handle

  • handle(request: HttpServerRequest): void
  • Handle the outbound HttpServerRequest.

    Parameters

    • request: HttpServerRequest

    Returns void

origin

  • Set the SocketAddress of the origin.

    Parameters

    • address: SocketAddress

    Returns HttpProxy

  • Set the host name and port number of the origin.

    Parameters

    • port: number
    • host: string

    Returns HttpProxy

originSelector

  • originSelector(selector: (arg: HttpServerRequest) => PromiseLike<SocketAddress>): HttpProxy
  • Set a selector that resolves the origin address based on the incoming HTTP request.

    Parameters

    • selector: (arg: HttpServerRequest) => PromiseLike<SocketAddress>
        • (arg: HttpServerRequest): PromiseLike<SocketAddress>
        • Parameters

          • arg: HttpServerRequest

          Returns PromiseLike<SocketAddress>

    Returns HttpProxy

Static reverseProxy

  • Create a new HttpProxy instance.

    Parameters

    • client: HttpClient

    Returns HttpProxy

  • Create a new HttpProxy instance.

    Parameters

    Returns HttpProxy

Generated using TypeDoc