CorsExtensions.UseCors Method (IAppBuilder, CorsOptions)


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

Namespace:   Owin
Assembly:  Microsoft.Owin.Cors (in Microsoft.Owin.Cors.dll)


public static IAppBuilder UseCors(
    this IAppBuilder app,
    CorsOptions options
static IAppBuilder^ UseCors(
    IAppBuilder^ app,
    CorsOptions^ options
static member UseCors : 
        app:IAppBuilder *
        options:CorsOptions -> IAppBuilder
Public Shared Function UseCors (
    app As IAppBuilder,
    options As CorsOptions
) As IAppBuilder


  • app
    Type: Owin.IAppBuilder

    The IAppBuilder passed to your configuration method

Return Value

Type: Owin.IAppBuilder

The original app parameter

See Also

CorsExtensions Class
Owin Namespace

Return to top