Class RegisteredClientOriginRegistry
Default implementation backed by
. Rebuilds its snapshot lazily on demand
after ; concurrent rebuilds are
de-duplicated via a so a burst of CORS preflights does not
trigger N parallel store scans.
public sealed class RegisteredClientOriginRegistry : IRegisteredClientOriginRegistry
Inheritance
Implements
Methods
GetAllowedOriginsAsync(CancellationToken)
Returns the current snapshot of allowed origins. Useful for diagnostics and tests.
public ValueTask<ImmutableHashSet<string>> GetAllowedOriginsAsync(CancellationToken ct = default)
IsAllowedAsync(string?, CancellationToken)
Returns true if origin matches at least one registered client's
public ValueTask<bool> IsAllowedAsync(string? origin, CancellationToken ct = default)
Constructors
RegisteredClientOriginRegistry(IServiceScopeFactory, Func<string?>?)
Creates a new registry.