CorsOptions Class

Definition

Provides programmatic configuration for Cors.

C#
public class CorsOptions
Inheritance
CorsOptions

Constructors

Properties

DefaultPolicyName

Gets or sets the default policy name.

Methods

AddDefaultPolicy(Action<CorsPolicyBuilder>)

Adds a new policy and sets it as the default.

AddDefaultPolicy(CorsPolicy)

Adds a new policy and sets it as the default.

AddPolicy(String, Action<CorsPolicyBuilder>)

Adds a new policy.

AddPolicy(String, CorsPolicy)

Adds a new policy.

GetPolicy(String)

Gets the policy based on the name

Applies to

Produk Versi
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0