X-Forwarded-For's first entry is whatever the client wrote; Caddy appends the true peer last. The limiter now reads the last entry, and only when the socket peer is loopback — the proxy — so a request that somehow reaches the server directly is keyed by its own address. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG