@bearnjs/rest
    Preparing search index...

    Interface CorsOptions

    Configuration options for CORS middleware. CorsOptions

    interface CorsOptions {
        credentials?: boolean;
        exposeHeaders?: string[];
        headers?: string[];
        maxAgeSeconds?: number;
        methods?: HTTPMethod[];
        origin?: string | RegExp | (string | RegExp)[];
    }
    Index

    Properties

    credentials?: boolean

    Whether credentials are allowed in CORS requests.

    exposeHeaders?: string[]

    The headers exposed to the client in CORS responses.

    headers?: string[]

    The headers allowed in CORS requests.

    maxAgeSeconds?: number

    The maximum age for preflight requests in seconds.

    methods?: HTTPMethod[]

    The HTTP methods allowed for CORS requests.

    origin?: string | RegExp | (string | RegExp)[]

    The origins allowed to access the server.