Skip to main content

Function: isOriginAllowed()

isOriginAllowed(origin, allowedOrigins): boolean

Defined in: http-server-auth/src/origin.ts:5

Returns true if origin matches any entry in the allowlist. Strings are compared exactly; RegExps are tested.

Parameters

ParameterType
originstring
allowedOrigins(string | RegExp | undefined)[]

Returns

boolean