resolveCorsOrigin
resolveCorsOrigin(
origin,requestOrigin):string|undefined
Defined in: cors.ts:12
Resolve CorsOptions.origin against a request’s Origin header into the concrete value to send back
as Access-Control-Allow-Origin, or undefined when the origin is disallowed (no CORS headers should
be sent). Shared by all three HTTP transports so origin: true (reflect), a fixed string, an allow-list,
and a custom function all behave identically regardless of which transport is mounted.
Parameters
Section titled “Parameters”origin
Section titled “origin”string | boolean | string[] | ((requestOrigin) => string | boolean) | undefined
requestOrigin
Section titled “requestOrigin”string | undefined
Returns
Section titled “Returns”string | undefined