Files
Ludv1gL c9c7115c15 fix(client-api): parse single-IP X-Forwarded-For values (#4839)
## Summary
`XForwardedFor::decode` requires a comma and fails to decode
`X-Forwarded-For: 1.2.3.4`.
Under axum 0.8 this now surfaces as HTTP 400 on every single-hop-proxy
request.

## Fix
Accept comma-separated or single-IP values — take the first entry either
way.

## Reproducer
Any browser going through a proxy that does `.insert("x-forwarded-for",
client_ip)`
(standard single-hop pattern) sees 400 Bad Request on WebSocket
subscribe.

## Version regression
Bug latent since the axum migration in 2023-06 (commit b4dae7475). axum
0.7
silently dropped the decoder error via `Option<TypedHeader<T>>`; axum
0.8
(#2713) promotes it to a 400 rejection.

Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-06-29 19:19:48 +00:00
..
2025-08-12 18:20:58 +00:00

⚠️ Internal Crate ⚠️

This crate is intended for internal use only. It is not stable and may change without notice.