Skip to content

Instantly share code, notes, and snippets.

@eldavido
Created November 15, 2017 18:50
Show Gist options
  • Save eldavido/513e4345c7df19162be0945cd85e9343 to your computer and use it in GitHub Desktop.
Save eldavido/513e4345c7df19162be0945cd85e9343 to your computer and use it in GitHub Desktop.
Call app.UseReverseProxyHttpsEnforcer in your Startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory lf) {
if (env.IsDevelopment()) {
app.UseDeveloperExceptionPage();
} else {
app.UseExceptionHandler("/error");
app.UseReverseProxyHttpsEnforcer();
}
app.UseAuthentication();
app.UseStaticFiles();
app.UseMvc(routes => {
routes.MapRoute(
name: "default",
template: "{controller}/{action=Index}/{id?}");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment