Dela via


CorsOptions.AddDefaultPolicy Method

Definition

Overloads

AddDefaultPolicy(CorsPolicy)

Adds a new policy and sets it as the default.

AddDefaultPolicy(Action<CorsPolicyBuilder>)

Adds a new policy and sets it as the default.

AddDefaultPolicy(CorsPolicy)

Source:
CorsOptions.cs
Source:
CorsOptions.cs
Source:
CorsOptions.cs

Adds a new policy and sets it as the default.

public:
 void AddDefaultPolicy(Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy);
public void AddDefaultPolicy (Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
member this.AddDefaultPolicy : Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> unit
Public Sub AddDefaultPolicy (policy As CorsPolicy)

Parameters

policy
CorsPolicy

The CorsPolicy policy to be added.

Applies to

AddDefaultPolicy(Action<CorsPolicyBuilder>)

Source:
CorsOptions.cs
Source:
CorsOptions.cs
Source:
CorsOptions.cs

Adds a new policy and sets it as the default.

public:
 void AddDefaultPolicy(Action<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^> ^ configurePolicy);
public void AddDefaultPolicy (Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> configurePolicy);
member this.AddDefaultPolicy : Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> -> unit
Public Sub AddDefaultPolicy (configurePolicy As Action(Of CorsPolicyBuilder))

Parameters

configurePolicy
Action<CorsPolicyBuilder>

A delegate which can use a policy builder to build a policy.

Applies to