Class DefaultCorsPolicyService
- Namespace
- Duende.IdentityServer.Services
- Assembly
- Duende.IdentityServer.dll
Default CORS policy service.
public class DefaultCorsPolicyService : ICorsPolicyService
- Inheritance
-
DefaultCorsPolicyService
- Implements
-
ICorsPolicyService
- Inherited Members
Constructors
DefaultCorsPolicyService(ILogger<DefaultCorsPolicyService>)
Initializes a new instance of the DefaultCorsPolicyService class.
public DefaultCorsPolicyService(ILogger<DefaultCorsPolicyService> logger)
Parameters
logger
ILogger<DefaultCorsPolicyService>
Fields
Logger
Logger
protected readonly ILogger Logger
Field Value
Properties
AllowAll
Gets or sets a value indicating whether all origins are allowed.
public bool AllowAll { get; set; }
Property Value
- bool
true
if allow all; otherwise,false
.
AllowedOrigins
The list allowed origins that are allowed.
public ICollection<string> AllowedOrigins { get; set; }
Property Value
- ICollection<string>
The allowed origins.
Methods
IsOriginAllowedAsync(string)
Determines whether the origin allowed.
public virtual Task<bool> IsOriginAllowedAsync(string origin)
Parameters
origin
stringThe origin.