CorsOptions.AddDefaultPolicy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.