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

    Variable originRequirementShapeConst

    originRequirementShape: Shape<
        TUnion<
            (
                | TUnsafe<RegExp>
                | TString
                | TUnsafe<OriginCheckCallback>
                | TObject<
                    {
                        anyOrigin: TUnsafe<true>;
                        anyOriginWithCredentials: TOptional<TUndefined>;
                    },
                >
                | TObject<
                    {
                        anyOrigin: TOptional<TUndefined>;
                        anyOriginWithCredentials: TUnsafe<true>;
                    },
                >
            )[],
        >,
    > = ...

    (Shape definition for OriginRequirement).

    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.

    @rest-vir/api