a month ago
We run a single-replica Fastify service on Hobby in EU West / Amsterdam behind Railway-generated HTTPS. We need independent client-IP rate limits without trusting spoofed forwarding headers. Explicit proxy trust is currently empty, so the application uses the immediate socket peer; health/readiness pass, but per-client acceptance is pending.
Your specifications describe X-Real-IP. An employee reply in https://station.railway.com/questions/supported-trust-model-for-client-ip-head-aafb68bc says the example 100.0.0.0/8 range is not guaranteed stable.
What supported mechanism verifies that the immediate peer is Railway ingress before we trust client-IP headers? Is there a maintained exclusive allowlist or another verifiable ingress identity? Please also confirm which header to use, overwrite/duplicate handling for caller-supplied X-Real-IP and X-Forwarded-For, private/direct bypass behavior, and stability across redeploys.
Our assistant recommended this platform clarification because the documented header and example range do not establish that trust boundary. Please provide guidance only; no resource/configuration changes or plan upgrade are requested.
Prepared with Railway's support template (v1).
3 Replies
a month ago
We don't publish a stable or exclusive address range for the proxy connection your container sees as its socket peer. An observed 100.64.0.0/10 address is not a supported contract and can change at any time, including across redeploys. There is also no edge-only ingress switch, application-visible mTLS identity, or signed forwarding header that proves a request came from our edge.
For requests through the public HTTP edge, including Railway-generated domains, use X-Real-IP as the client address. The edge overwrites X-Real-IP, X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host. Any caller-supplied copies are replaced, not appended to or preserved, so a forged value sent through the edge cannot set the client IP. X-Forwarded-For is not guaranteed to have a single entry or a fixed hop count.
Requests over the private network (*.railway.internal) do not pass through the edge and are not sanitized. Other services in the same project and environment can reach your listening port directly and send their own headers. Private networks are isolated between projects and environments, so that environment is the trust boundary. Any TCP proxy you expose is also a raw path with no header sanitization. If no other service in that environment and no TCP proxy can reach the listener, trusting X-Real-IP relies on that assumption, not on verifying the peer address.
Status changed to Awaiting User Response Railway • about 2 months ago
a month ago
Please could Railway staff confirm the BOT response and the supported security contract? We need independent client-IP rate limits on a public HTTPS service whose listener is also reachable by trusted services in the same private environment. We are keeping explicit proxy trust disabled until that boundary is verified.
Is there a maintained exclusive ingress peer source or authenticated ingress identity? If neither exists, please confirm that private-environment isolation is the only supported boundary, including public-edge handling of repeated/spoofed X-Real-IP headers and unsanitized private bypass. We need guidance only; no resource changes or plan upgrade.
Status changed to Awaiting Railway Response Railway • about 1 month ago
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 1 month ago