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

    Type Alias OriginRequirement

    OriginRequirement:
        | RequireExactlyOne<{ anyOrigin: true; anyOriginWithCredentials: true }>
        | string
        | RegExp
        | OriginCheckCallback

    Allows you to set origin requirements.

    • A string: requires the incoming origin to exactly match this string.
    • A RegExp: requires the incoming origin to match this RegExp.
    • A function: requires the incoming origin to result in a true return value from this function.

    When no clientOriginRequirement is set on either a route or the api as a whole, all origins are accepted (Access-Control-Allow-Origin: * is returned). Set a non-undefined value at the route or api level to restrict who may call the api from a browser.