Auth0 + Azure Container Apps + Azure APIM + dotnet blazor

Ready to post? :mag: First, try searching for your answer.
Hi!

I have a dotnet app (Blazor .net 8) running inside an Azure Container App. All traffic is configured to go through Azure API Management system, so both REST API calls and the actual website HTTP requests go through there. The DNS for our custom domain is configured in the APIM.

Suppose my site is https://www.blazorapp.net
And the “internal” name for the azure container app is internal-azure-name.azure.com

We have this problem:

Is there a way I can configure the FULL PATH (ie the domain too) for the callback and not just the path inside the app?

Mentioning @andrea.chiarelli

Thanks!

I believe my problem is related to this:

Hey @psantosl,
I think you are right. You need to add the X-Forwarded-Host header as you did here.

It actually didn’t work until (5 minutes ago) I changed the configuration of my APIM and introduced the right headers this way

    <inbound>
        <base />
        <set-header name="X-Forwarded-For" exists-action="override">
            <value>@(context.Request.IpAddress)</value>
        </set-header>
        <set-header name="X-Forwarded-Proto" exists-action="override">
            <value>@(context.Request.OriginalUrl.Scheme)</value>
        </set-header>
        <set-header name="X-Forwarded-Host" exists-action="override">
            <value>@(context.Request.OriginalUrl.Host)</value>
        </set-header>
        <set-backend-service id="apim-generated-policy" backend-id="MyContainerApp" />
    </inbound>

I thought APIM generated the headers by default, but it seems it doesn’t!!!