-
Notifications
You must be signed in to change notification settings - Fork 378
Closed
Description
Just spent a few hours trying to get this working. I had previously had something working ok in a windows web app, but when switching to a container web app under Linux, it kept on redirecting back to the insecure http://xxxxxx.azurewebsites.net/signin-oidc rather than the secure https://xxxxx.azurewebsites.net/signin-oidc
A lot of reading and trial and error and this appears to work.
services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
options.RequireHeaderSymmetry = false;
options.KnownNetworks.Clear();
options.KnownProxies.Clear();
});
And at the top of Configure
app.UseForwardedHeaders();
Is this expected behaviour? Is it documented somewhere, if so I couldn't find it.
Metadata
Metadata
Assignees
Labels
No labels