mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-07-22 01:57:41 -04:00
c9c7115c15
## 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>
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.