React to Cors api changes
This commit is contained in:
parent
29a25b2ed1
commit
c79469c3b3
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
|
using Microsoft.AspNet.Cors.Core;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
|
||||||
namespace CorsWebSite
|
namespace CorsWebSite
|
||||||
|
|
@ -11,7 +12,7 @@ namespace CorsWebSite
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddMvc();
|
services.AddMvc();
|
||||||
services.ConfigureCors(options =>
|
services.Configure<CorsOptions>(options =>
|
||||||
{
|
{
|
||||||
options.AddPolicy(
|
options.AddPolicy(
|
||||||
"AllowAnySimpleRequest",
|
"AllowAnySimpleRequest",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue