MvcCorsMvcCoreBuilderExtensions.AddCors 方法

定义

重载

AddCors(IMvcCoreBuilder)

配置为 IMvcCoreBuilder 使用 CORS。

AddCors(IMvcCoreBuilder, Action<CorsOptions>)

配置为 IMvcCoreBuilder 使用 CORS。

AddCors(IMvcCoreBuilder)

Source:
MvcCorsMvcCoreBuilderExtensions.cs
Source:
MvcCorsMvcCoreBuilderExtensions.cs
Source:
MvcCorsMvcCoreBuilderExtensions.cs

配置为 IMvcCoreBuilder 使用 CORS。

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

参数

返回

IMvcCoreBuilder

适用于

AddCors(IMvcCoreBuilder, Action<CorsOptions>)

Source:
MvcCorsMvcCoreBuilderExtensions.cs
Source:
MvcCorsMvcCoreBuilderExtensions.cs
Source:
MvcCorsMvcCoreBuilderExtensions.cs

配置为 IMvcCoreBuilder 使用 CORS。

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

参数

setupAction
Action<CorsOptions>

用于配置所提供的 CorsOptionsAction<T>

返回

IMvcCoreBuilder

适用于