X-Real-IP not working
fairdocument
FREEOP

a year ago

I've been trying to implement X-Real-IP, but it's not being set. I've also tried X-Forwarded-For and X-Envoy-External-Address, though neither of them is passing a client IP. Anything else I should attempt?

Solved$10 Bounty

Pinned Solution

fra
HOBBY

a year ago

I"m able to get the ip using :

req.["X-Forwarded-For"] ?? req["X-Real-Ip"]

6 Replies

Railway
BOT

a year ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


fairdocument
FREEOP

a year ago

These are helpful, but unfortunately, the X-Real-IP isn't functioning as documented.


fra
HOBBY

a year ago

I"m able to get the ip using :

req.["X-Forwarded-For"] ?? req["X-Real-Ip"]

a year ago

^^Could you confirm if fra solved your issues @fairdocument?


Status changed to Awaiting User Response Railway 11 months ago


fra
HOBBY

a year ago

you can also check this link:

https://utilities-metal-us-east-zfs.up.railway.app/raw

that (if I understood correctly) should show you the raw header passed by railway


Status changed to Awaiting Railway Response Railway 11 months ago


Unless there's something overwriting that header from the application level, fra's answer is correct. I'm accepting it as the answer.


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved ray-chen 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...