rest-vir - v1.0.0
    Preparing search index...

    Type Alias OriginRequirement

    OriginRequirement:
        | undefined
        | string
        | RegExp
        | AnyOrigin
        | (
            | ((origin: string | undefined) => MaybePromise<boolean>)
            | string
            | RegExp
        )[]
        | ((origin: string | undefined) => MaybePromise<boolean>)

    Options explained:

    • undefined: when on an endpoint, this denotes that the endpoint defers origin checks to the parent service's origin requirement. When on the service, undefined is not allowed.
    • string: require all request origins to exactly match the given string.
    • RegExp: all request origins must match the RegExp.
    • AnyOrigin: allow any origin.
    • A function: allow custom checking. If this function returns something truthy, the origin is allowed.
    • An array: a combination of string values, RegExp values, or functions to compare against. If any of the array entries allow a request origin, it passes.