node-webserver
    Preparing search index...

    Type Alias SecurityConfig

    type SecurityConfig = {
        allowedHosts?: HostMatcher | HostMatcher[];
        allowedWebSocketOrigins?: HostMatcher | HostMatcher[];
        maxRequestBodySize?: number;
        maxWebSocketPayload?: number;
        trustHostHeader?: boolean;
    }
    Index

    Properties

    allowedHosts?: HostMatcher | HostMatcher[]

    Restrict trusted Host values when trustHostHeader is enabled.

    allowedWebSocketOrigins?: HostMatcher | HostMatcher[]

    Restrict accepted WebSocket Origin values. When omitted, Origin is not enforced by default.

    maxRequestBodySize?: number

    Maximum accepted request body size based on Content-Length. Requests above the limit are rejected before the body is read.

    maxWebSocketPayload?: number

    Maximum accepted WebSocket message size in bytes. Passed to ws as maxPayload.

    trustHostHeader?: boolean

    Trust the incoming Host header when constructing event.url/request.url. Disabled by default to avoid host header poisoning in absolute URL generation.