Skip to content

Interface: GateOptions

Options for mountGate.

optional brandName?: string

Product name displayed by the hosted login page.


optional forwardHeaders?: readonly string[]

Extra x- request headers tunnel traffic may forward (unioned with the built-in allow-list). Every other x- header is stripped from tunnel traffic.


gate: AuthGateApi

The in-process gate API (session/request/verify/status).


optional gatePaths?: readonly string[]

Path prefixes that require a valid session, beyond the built-in /api/. The default gating model assumes a self-protecting SPA: static loads freely so the app can render, and only /api/* is gated. An app whose privileged surface is NOT under /api/ (e.g. a WebSocket at /ws) lists those prefixes here so they are gated too. Login routes (AUTH_PREFIX) are always open.


optional publicDomain?: string | readonly string[]

The public <subdomain>.<server> that identifies portr traffic by Host. When absent, no request is ever classified as tunnel traffic and the gate is inert (everything passes through) - a tunnel with no public domain gates nothing.