Skip to content

Instantly share code, notes, and snippets.

@evan-boissonnot
Created February 16, 2019 11:36
Embed
What would you like to do?
AllowSpecificOrigin Cors asp.net core
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCors("AllowSpecificOrigin");
app.UseMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment