CorsMiddlewareExtensions.UseCors CorsMiddlewareExtensions.UseCors CorsMiddlewareExtensions.UseCors Method

Definition

Overloads

UseCors(IApplicationBuilder) UseCors(IApplicationBuilder) UseCors(IApplicationBuilder)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>) UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>) UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

UseCors(IApplicationBuilder, String) UseCors(IApplicationBuilder, String) UseCors(IApplicationBuilder, String)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

UseCors(IApplicationBuilder) UseCors(IApplicationBuilder) UseCors(IApplicationBuilder)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

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

Parameters

app
IApplicationBuilder IApplicationBuilder IApplicationBuilder

The IApplicationBuilder passed to your Configure method

Returns

UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>) UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>) UseCors(IApplicationBuilder, Action<CorsPolicyBuilder>)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

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

Parameters

app
IApplicationBuilder IApplicationBuilder IApplicationBuilder

The IApplicationBuilder passed to your Configure method.

configurePolicy
Action<CorsPolicyBuilder>

A delegate which can use a policy builder to build a policy.

Returns

UseCors(IApplicationBuilder, String) UseCors(IApplicationBuilder, String) UseCors(IApplicationBuilder, String)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.

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

Parameters

app
IApplicationBuilder IApplicationBuilder IApplicationBuilder

The IApplicationBuilder passed to your Configure method

policyName
String String String

The policy name of a configured policy.

Returns

Applies to