@ngrok/ngrok
    Preparing search index...

    Class HttpListenerBuilder

    r" An ngrok listener backing an HTTP endpoint. r" r"

    Index

    Constructors

    Methods

    • Restriction placed on the origin of incoming connections to the edge to only allow these CIDR ranges. Call multiple times to add additional CIDR ranges. See IP restrictions in the ngrok docs for additional details.

      Parameters

      • cidr: string

      Returns this

    • A set of regular expressions used to match User-Agents that will be allowed. On request, the User Agent Filter module will check the incoming User-Agent header value against the list of defined allow and deny regular expression rules. See [User Agent Filter] in the ngrok docs for additional details.

      .. [User Agent Filter]: https://ngrok.com/docs/cloud-edge/modules/user-agent-filter/

      Parameters

      • regex: string

      Returns this

    • The L7 application protocol to use for this edge, e.g. "http2" or "http1".

      Parameters

      • appProtocol: string

      Returns this

    • Credentials for basic authentication. If not called, basic authentication is disabled.

      Parameters

      • username: string
      • password: string

      Returns this

    • Reject requests when 5XX responses exceed this ratio. Disabled when 0. See Circuit Breaker in the ngrok docs for additional details.

      Parameters

      • circuitBreaker: number

      Returns this

    • Enable gzip compression for HTTP responses. See Compression in the ngrok docs for additional details.

      Returns this

    • Restriction placed on the origin of incoming connections to the edge to deny these CIDR ranges. Call multiple times to add additional CIDR ranges. See IP restrictions in the ngrok docs for additional details.

      Parameters

      • cidr: string

      Returns this

    • A set of regular expressions used to match User-Agents that will be denied. On request, the User Agent Filter module will check the incoming User-Agent header value against the list of defined allow and deny regular expression rules. See [User Agent Filter] in the ngrok docs for additional details.

      .. [User Agent Filter]: https://ngrok.com/docs/cloud-edge/modules/user-agent-filter/

      Parameters

      • regex: string

      Returns this

    • The domain to request for this edge, any valid domain or hostname that you have previously registered with ngrok. If using a custom domain, this requires registering in the ngrok dashboard and setting a DNS CNAME value.

      Parameters

      • domain: string

      Returns this

    • Listener backend metadata. Viewable via the dashboard and API, but has no bearing on listener behavior.

      To automatically forward connections, you can use listenAndForward, or listenAndServe on the Listener Builder. These methods will also set this forwardsTo value.

      Parameters

      • forwardsTo: string

      Returns this

    • Begin listening for new connections on this listener.

      Parameters

      • Optionalbind: null | boolean

      Returns Promise<Listener>

    • Begin listening for new connections on this listener and forwarding them to the given url. This method will also set the forwardsTo value.

      Parameters

      • toUrl: string

      Returns Promise<Listener>

    • Begin listening for new connections on this listener and forwarding them to the given server. This method will also set the forwardsTo value.

      Parameters

      • server: any

      Returns Promise<Listener>

    • Listener-specific opaque metadata. Viewable via the API.

      Parameters

      • metadata: string

      Returns this

    • Certificates to use for client authentication at the ngrok edge. See Mutual TLS in the ngrok docs for additional details.

      Parameters

      • mutualTlsca: Uint8Array

      Returns this

    • OAuth configuration. If not called, OAuth is disabled. See OAuth in the ngrok docs for additional details.

      Parameters

      • provider: string
      • OptionalallowEmails: null | string[]
      • OptionalallowDomains: null | string[]
      • Optionalscopes: null | string[]
      • OptionalclientId: null | string
      • OptionalclientSecret: null | string

      Returns this

    • OIDC configuration. If not called, OIDC is disabled. See OpenID Connect in the ngrok docs for additional details.

      Parameters

      • issuerUrl: string
      • clientId: string
      • clientSecret: string
      • OptionalallowEmails: null | string[]
      • OptionalallowDomains: null | string[]
      • Optionalscopes: null | string[]

      Returns this

    • Parameters

      • policy: string

      Returns this

    • Enable endpoint pooling for this listener.

      Parameters

      • poolingEnabled: boolean

      Returns this

    • The version of PROXY protocol to use with this listener "1", "2", or "" if not using.

      Parameters

      • proxyProto: string

      Returns this

    • Removes a header from requests to this edge. See Request Headers in the ngrok docs for additional details.

      Parameters

      • name: string

      Returns this

    • Removes a header from responses from this edge. See Response Headers in the ngrok docs for additional details.

      Parameters

      • name: string

      Returns this

    • Adds a header to all requests to this edge. See Request Headers in the ngrok docs for additional details.

      Parameters

      • name: string
      • value: string

      Returns this

    • Adds a header to all responses coming from this edge. See Response Headers in the ngrok docs for additional details.

      Parameters

      • name: string
      • value: string

      Returns this

    • The scheme that this edge should use. "HTTPS" or "HTTP", defaults to "HTTPS".

      Parameters

      • scheme: string

      Returns this

    • Parameters

      • trafficPolicy: string

      Returns this

    • Whether to disable certificate verification for this listener.

      Parameters

      • verifyUpstreamTls: boolean

      Returns this

    • WebhookVerification configuration. If not called, WebhookVerification is disabled. See Webhook Verification in the ngrok docs for additional details.

      Parameters

      • provider: string
      • secret: string

      Returns this

    • Convert incoming websocket connections to TCP-like streams.

      Returns this