Skip to content

Instantly share code, notes, and snippets.

@zihotki
Created March 23, 2018 22:16
Show Gist options
  • Save zihotki/3881fe398f83dc2097c04f0233e56a9c to your computer and use it in GitHub Desktop.
Save zihotki/3881fe398f83dc2097c04f0233e56a9c to your computer and use it in GitHub Desktop.
asp.net core reverse proxy
Install the Add the Microsoft.AspNet.HttpOverrides package
In your Configure() method add
app.UseOverrideHeaders(new OverrideHeaderMiddlewareOptions
{
ForwardedOptions = ForwardedHeaders.XForwardedFor |
ForwardedHeaders.XForwardedProto
});
The app will now believe it's on HTTPS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment