Skip to content

0.2.1: client address from the edge's hop, not the client's - #2

Merged
ralyodio merged 1 commit into
mainfrom
client-ip
Sep 5, 2026
Merged

ralyodio merged 1 commit into
mainfrom
client-ip

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

clientIp read the first X-Forwarded-For entry, which a client can seed, so denyCidrs could be stepped around by sending one. Now: X-Real-IP when present (nginx sets it from the socket), else the last X-Forwarded-For hop (the one Railway's proxy or nginx appends).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJaXiqE9BDoNfoJBhfXroC

`clientIp` took the first X-Forwarded-For entry, which is whatever the
client chose to send, so a denylist read from it was a denylist any client
could step around by sending one. The entry our own edge appends is the
last, on Railway's proxy and on nginx alike, and nginx's X-Real-IP is the
same hop set from the socket. Both are now preferred over anything the
client seeded.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJaXiqE9BDoNfoJBhfXroC
@ralyodio
ralyodio merged commit ff3711e into main Sep 5, 2026
@ralyodio
ralyodio deleted the client-ip branch September 5, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant