R
Railway11mo ago
e.1923

railway hides request IP

I suspect railway uses a reverse proxy, am wondering whether there is any way to fetch the IP of the original request? currently it's always some private IP that is visible to my app.
Solution:
the X-Forwarded-For header
Jump to solution
3 Replies
Percy
Percy11mo ago
Project ID: N/A
Solution
Brody
Brody11mo ago
the X-Forwarded-For header
Brody
Brody11mo ago
https://utilities.up.railway.app/raw there middleware for about every framework/router that will trust the proxy and then use the IP from X-Forwarded-For as the default incoming IP for requests