Version 6.x has been out of support since May 14, 2024, and this corresponding section of the documentation is no longer maintained. We strongly recommend you upgrade to the latest supported version of 7.x and read the latest version of this documentation.

CORS Policy Service

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>
        /// <returns></returns>
        Task<bool> IsOriginAllowedAsync(string origin);
    }