@cldn/web-ts - v0.4.0
    Preparing search index...

    Interface Options<A>

    Server options

    interface Options<A> {
        authenticators?: Authenticator<A>[];
        copyOrigin?: boolean;
        globalHeaders?: HeadersInit;
        handleConditionalRequests?: boolean;
        port?: number;
        trustedProxies?: Network<IP>;
    }

    Type Parameters

    • A
    Index

    Properties

    authenticators?: Authenticator<A>[]

    Authenticators for handling request authentication.

    copyOrigin?: boolean

    Whether to set the Access-Control-Allow-Origin response header to copy the Origin request header. If enabled and the client does not set Origin, the header will be set to *. Will also enable setting Vary: Origin.

    false
    
    globalHeaders?: HeadersInit

    Headers to send with every response.

    handleConditionalRequests?: boolean

    Automatically handle conditional requests for GET and HEAD requests that result in a 200 status code. If-Range headers are ignored.

    true
    
    port?: number

    The HTTP listener port. From 1 to 65535. Ports 1–1023 require privileges. If not set, Server#listen|Server.listen() must be called manually.

    trustedProxies?: Network<IP>

    The network of trusted proxies. If specified, headers such as Forwarded, X-Forwarded-For, and X-Real-IP will be trusted and automatically processed.