CorsExtensions.UseCors(IAppBuilder, CorsOptions) Method

Definition

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

public:
[System::Runtime::CompilerServices::Extension]
 static Owin::IAppBuilder ^ UseCors(Owin::IAppBuilder ^ app, Microsoft::Owin::Cors::CorsOptions ^ options);
public static Owin.IAppBuilder UseCors (this Owin.IAppBuilder app, Microsoft.Owin.Cors.CorsOptions options);
static member UseCors : Owin.IAppBuilder * Microsoft.Owin.Cors.CorsOptions -> Owin.IAppBuilder
<Extension()>
Public Function UseCors (app As IAppBuilder, options As CorsOptions) As IAppBuilder

Parameters

app
Owin.IAppBuilder

The IAppBuilder passed to your configuration method

options
CorsOptions

An options class that controls the middleware behavior

Returns

Owin.IAppBuilder

The original app parameter

Applies to