Skip to content
Introducing the next era of Duende IdentityServer. Read our CEO’s announcement

CORS Policy Service

Duende.IdentityServer.Stores.ICorsPolicyService

Section titled “Duende.IdentityServer.Stores.ICorsPolicyService”

Used to determine if CORS requests are allowed to certain protocol endpoints.

/// <summary>
/// Service that determines if CORS is allowed.
/// </summary>
public interface ICorsPolicyService
{
/// <summary>
/// Determines whether origin is allowed.
/// </summary>
/// <param name="origin">The origin.</param>
/// <param name="ct">The cancellation token.</param>
/// <returns></returns>
Task<bool> IsOriginAllowedAsync(string origin, CancellationToken ct);
}