Property CorsOriginsResolver

Assembly: redb.Route.Http.dll

Optional per-request CORS-origin resolver. When set, takes precedence over
. The delegate receives the incoming
and returns either:
a specific origin string (e.g. "https://app.example.com") — echoed back
in Access-Control-Allow-Origin;"*" — wildcard (browsers reject this combination with credentials);null — origin not allowed; no CORS headers will be emitted.
The delegate must be cheap and thread-safe; it runs on every CORS-eligible request.
Cannot be configured via URI parameters; set this in DI via the global
or programmatically on the endpoint options.

public Func<HttpRequest, string?>? CorsOriginsResolver { get; set; }