Compartir a través de


CorsMiddlewareExtensions.UseCors Método

Definición

Sobrecargas

UseCors(IApplicationBuilder)

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>)

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

UseCors(IApplicationBuilder, String)

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

UseCors(IApplicationBuilder)

Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder) As IApplicationBuilder

Parámetros

app
IApplicationBuilder

IApplicationBuilder pasado al método Configure

Devoluciones

El parámetro de la aplicación original

Se aplica a

UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>)

Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^> ^ configurePolicy);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> configurePolicy);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder, configurePolicy As Action(Of CorsPolicyBuilder)) As IApplicationBuilder

Parámetros

app
IApplicationBuilder

IApplicationBuilder se pasó al método Configure.

configurePolicy
Action<CorsPolicyBuilder>

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

Devoluciones

El parámetro de la aplicación original

Se aplica a

UseCors(IApplicationBuilder, String)

Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs
Source:
CorsMiddlewareExtensions.cs

Agrega middleware CORS a la canalización de la aplicación web para permitir solicitudes entre dominios.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCors(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ policyName);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string policyName);
static member UseCors : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCors (app As IApplicationBuilder, policyName As String) As IApplicationBuilder

Parámetros

app
IApplicationBuilder

IApplicationBuilder pasado al método Configure

policyName
String

Nombre de directiva de una directiva configurada.

Devoluciones

El parámetro de la aplicación original

Se aplica a