Compartir a través de


CorsOptions.AddPolicy Método

Definición

Sobrecargas

AddPolicy(String, CorsPolicy)

Agrega una nueva directiva.

AddPolicy(String, Action<CorsPolicyBuilder>)

Agrega una nueva directiva.

AddPolicy(String, CorsPolicy)

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

Agrega una nueva directiva.

public:
 void AddPolicy(System::String ^ name, Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy);
public void AddPolicy (string name, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
member this.AddPolicy : string * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> unit
Public Sub AddPolicy (name As String, policy As CorsPolicy)

Parámetros

name
String

El nombre de la directiva.

policy
CorsPolicy

Directiva CorsPolicy que se va a agregar.

Se aplica a

AddPolicy(String, Action<CorsPolicyBuilder>)

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

Agrega una nueva directiva.

public:
 void AddPolicy(System::String ^ name, Action<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^> ^ configurePolicy);
public void AddPolicy (string name, Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> configurePolicy);
member this.AddPolicy : string * Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> -> unit
Public Sub AddPolicy (name As String, configurePolicy As Action(Of CorsPolicyBuilder))

Parámetros

name
String

El nombre de la directiva.

configurePolicy
Action<CorsPolicyBuilder>

Delegado que puede usar un generador de directivas para crear una directiva.

Se aplica a