enable cors asp.net mvc

74

enable cors asp.net mvc -

public static void Register(HttpConfiguration config)
{
    var corsAttr = new EnableCorsAttribute("http://example.com", "*", "*");
    config.EnableCors(corsAttr);
}

enable cors asp.net mvc -

public static void Register(HttpConfiguration config)
{
    // New code
    config.EnableCors();
}

enable cors asp.net mvc -

Response.AppendHeader("Access-Control-Allow-Origin", "*");

Comments

Submit
0 Comments