#2237·uvicorn

Add support for Fowarded header (RFC 7239)

Author: KludexCreated Jan 29, 2024Updated Nov 1, 2025

Discussed in https://github.com/encode/uvicorn/discussions/2236

Originally posted by nhairs January 28, 2024 We should probably support the Forwarded header which was standardised in RFC 7239.

One of the benefits of this header over X-Forwarded-* headers is that it supports including the port of the client rather than just the address.

See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded

[!IMPORTANT]

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar