Permalink
Browse files

added CORS

  • Loading branch information...
saraford committed Dec 2, 2017
1 parent 19eb927 commit a64efb2370fab759e19be65031cd6bc299407d3a
Showing with 5 additions and 0 deletions.
  1. +5 −0 HelloCoreAPI/Startup.cs
View
@@ -33,6 +33,8 @@ public void ConfigureServices(IServiceCollection services)
options.Filters.Add(new RequireHttpsAttribute());
});
services.AddCors();
services.AddAuthentication(options =>
{
options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -58,6 +60,9 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseDeveloperExceptionPage();
}
app.UseCors(builder =>
builder.WithOrigins("http://localhost:6420").AllowAnyHeader().AllowAnyMethod());
ScopeRead = Configuration["AzureAdB2C:ScopeRead"];
app.UseAuthentication();

0 comments on commit a64efb2

Please sign in to comment.