Open
Description
Right now the this layer automatically parses X-Forwarded-For
and takes the leftmost value in there... or takes the TCP connection address if no header is present. This means that anyone can spoof client IP addresses by adding a X-Forwarded-For
header.
It should be possible to disable looking at X-Forwarded-For
, or to take the rightmost value from X-Forwarded-For
instead (the one added by the latest load balancer...). For discussion on these things... see: https://crates.io/crates/axum-client-ip