rest-vir - v2.2.0
    Preparing search index...

    Type Alias ApiServerOptions

    type ApiServerOptions = {
        disableRestVirApiNameHeader?: boolean;
        externalOrigin: string;
        webSocketMaxPayload?: number;
    }
    Index

    Properties

    disableRestVirApiNameHeader?: boolean

    When true, the rest-vir-api response header (which carries api.definition.apiName) is not attached to responses, and it is not exposed via the CORS Access-Control-Expose-Headers value. Useful when the server should not advertise that it is a rest-vir host.

    Note: findDevServerPort from @rest-vir/api relies on this header to identify which port is hosting the api during dev. Disabling the header breaks that discovery path; pin the dev port explicitly in that case.

    false
    
    externalOrigin: string

    The origin at which the api is hosted on. Fetch requests and WebSocket connections should be sent to this origin to connect with this server. The internal server alone will not know what this is (since it's going to be listening on some localhost port), so you must provide this so that the endpoint handlers know what the current origin is.

    https://developer.mozilla.org/en-US/docs/Web/API/Location for help on which part of the URL is the origin (if necessary).

    webSocketMaxPayload?: number

    Maximum size, in bytes, of an inbound WebSocket message frame. See runApiOptionsShape.webSocketMaxPayload for details.