Forwarded Headers for ASP.NET Core Apps on Azure Container Apps

2023-08-23 azurecontainer

This diagram shows a scenario that ASP.NET Core application is hosted in Azure Container Apps and listens on HTTP port 8080 while Azure Container Apps ingress is configured with HTTPS. The original request protocol HTTPS is lost but the forward header X-Forwarded-Proto has value HTTPS that can be used by ASP.NET Core applications to generate the right URL with HTTPS protocol.

HTTP:8080
X-Forwarded-Proto: https
[Not supported by viewer]
Azure Container Apps Ingress
[Not supported by viewer]
HTTPS:443
[Not supported by viewer]
Azure Container Apps Container Replicas
[Not supported by viewer]
MsPortalFx.base.images-15 public:true sdk: MsPortalFx.base.images.Polychromatic.Browser() category: General image/svg+xml MsPortalFx.base.images-15 Icon-containers-104 public:true sdk:false category: Compute, Containers image/svg+xml Icon-containers-104