Skip to content

Container app on azure configuration #556

@nrandell

Description

@nrandell

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions