Compartir a través de


CorsServiceCollectionExtensions.AddCors Método

Definición

Sobrecargas

AddCors(IServiceCollection)

Agrega servicios de uso compartido de recursos entre orígenes al especificado IServiceCollection.

AddCors(IServiceCollection, Action<CorsOptions>)

Agrega servicios de uso compartido de recursos entre orígenes al especificado IServiceCollection.

AddCors(IServiceCollection)

Source:
CorsServiceCollectionExtensions.cs
Source:
CorsServiceCollectionExtensions.cs
Source:
CorsServiceCollectionExtensions.cs

Agrega servicios de uso compartido de recursos entre orígenes al especificado IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCors (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddCors : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddCors (services As IServiceCollection) As IServiceCollection

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

AddCors(IServiceCollection, Action<CorsOptions>)

Source:
CorsServiceCollectionExtensions.cs
Source:
CorsServiceCollectionExtensions.cs
Source:
CorsServiceCollectionExtensions.cs

Agrega servicios de uso compartido de recursos entre orígenes al especificado IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCors (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions> setupAction);
static member AddCors : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddCors (services As IServiceCollection, setupAction As Action(Of CorsOptions)) As IServiceCollection

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

setupAction
Action<CorsOptions>

Action<T> para configurar el objeto CorsOptions proporcionado.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a