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!!!