Created
March 23, 2018 22:16
-
-
Save zihotki/3881fe398f83dc2097c04f0233e56a9c to your computer and use it in GitHub Desktop.
asp.net core reverse proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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