You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8f51fff
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/forwarded-headers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This changes the previous trust-all behavior. Before upgrading a deployment behi
19
19
20
20
Direct self-hosted installations do not need a proxy or additional configuration. `ForwardLimit: 1` is the maximum number of forwarded entries processed, not a minimum number of proxies required on each request. Requests without forwarded headers retain their connection IP and scheme. Multiple trusted proxies require a limit matching the intended chain and trust configuration for each traversed proxy.
21
21
22
-
The current application configuration requires a positive integer. An explicit zero or negative limit prevents the middleware from initializing. This is stricter than ASP.NET Core itself: zero processes no forwarded entries, and a nullable limit can allow unlimited depth. This application does not currently expose the unlimited option. Supporting an explicit disabled mode or unlimited depth should be a separate, tested configuration decision; unlimited depth still requires restricted trusted peers.
22
+
`ForwardLimit`defaults to `1`. Set it to `0` to disable forwarded-header processing, including headers from trusted proxies; requests retain the connection IP and scheme. Negative values are invalid and prevent the middleware from initializing. A positive value caps the number of entries processed, with processing also stopping at an unknown peer. This application requires a finite integer and does not expose ASP.NET Core's nullable/unlimited option. Direct self-hosters can leave the default unchanged or explicitly disable processing; deployments relying on a TLS-terminating proxy must keep processing enabled and configure their trusted peers.
23
23
24
24
Forwarded headers run after exception/status-code handling and before HTTPS redirection, request logging, routing, MCP origin validation, authentication, and throttling. This lets downstream middleware use the validated client IP and scheme. Microsoft explicitly permits placement after diagnostics and error handling. See [Microsoft's proxy configuration guidance](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-10.0).
0 commit comments