Skip to content

Commit 4237a19

Browse files
authored
Add more details for ingress
1 parent 6bfcb8d commit 4237a19

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

articles/container-apps/dotnet-overview.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,28 @@ After you've added a Dockerfile to your .NET project, you can deploy it to Azure
4444

4545
## Use the HTTP ingress
4646

47-
Azure Container Apps includes a built-in HTTP ingress, which allows you to expose your apps to external traffic. To learn more, see [HTTP ingress in Azure Container Apps](ingress.md).
47+
Azure Container Apps includes a built-in HTTP ingress that allows you to expose your apps to external traffic. To learn more, see [HTTP ingress in Azure Container Apps](ingress.md).
4848

49-
All incoming HTTP requests are first handled by the ingress, then routed to your app. TLS termination is also handled by the ingress, so you don't need to configure HTTPS in your app.
49+
All incoming requests are first handled by the ingress, then routed to your app. The ingress handles TLS termination and custom domains, so you don't need to configure them in your app.
50+
51+
The ingress exposes port 443 for HTTPS traffic. Optionally, it can also expose port 80 for HTTP traffic. The ingress forwards requests to your app at its target port.
52+
53+
If your app needs metadata about the original request, it can use X-forwarded headers.
5054

5155
### Target port
5256

53-
By default, the Dockerfile for an ASP.NET Core app is configured to listen on HTTP. The default port that it listens to depends on the ASP.NET Core version:
57+
To receive traffic, the ingress must be configured with the correct target port. The target port is the port that your app's HTTP server is listening to.
58+
59+
When ASP.NET Core is running in a container, the port(s) that it listens to is configured in the container image. When you use the [official ASP.NET Core images](/aspnet/core/host-and-deploy/docker/building-net-docker-images), your app is configured to listen to HTTP on a default port. The default port depends on the ASP.NET Core version:
5460

5561
* ASP.NET Core 7 and earlier: `80`
5662
* ASP.NET Core 8 and later: `8080`
5763

58-
When you configure the ingress, set the target port to the number corresponding to the version of ASP.NET Core you're using.
64+
When you configure the ingress, set the target port to the number corresponding to the container image you're using.
5965

6066
### X-forwarded headers
6167

62-
Because the original HTTP request is handled by the ingress, your app will see the ingress as the client. There are some situations where your app needs to know the original client's IP address or the original protocol (HTTP or HTTPS). The HTTP ingress adds [`X-Forwarded-*` headers](ingress-overview.md#http-headers) to the request that contain this information.
68+
Because the original HTTP request is handled by the ingress, your app will see the ingress as the client. There are situations where your app needs to know the original client's IP address or the original protocol (HTTP or HTTPS). The HTTP ingress adds [`X-Forwarded-*` headers](ingress-overview.md#http-headers) to the request that contain this information.
6369

6470
You can configure your ASP.NET Core app to use these headers by adding the following code:
6571

0 commit comments

Comments
 (0)