Skip to content
Public HTTP ingress trust boundary and health checks in an isolated environment
xuniuniu9119-art
OP

a month ago

Hello Railway team,

We are reviewing a single-service API deployment in a dedicated environment, with no other services in that environment and no TCP proxy. This is a platform networking clarification, not an outage or a request to change any live service.

We read the employee-confirmed discussion: https://station.railway.com/questions/fastapi-uvicorn-trusted-proxy-configura-9c06fa12 and the public networking and healthcheck documentation. We understand that there is no supported fixed socket-peer range, and that private-network callers bypass public-edge header handling. We will not treat observed proxy IPs as a durable trust contract or use a forwarding header as authentication.

Could a Railway team member clarify the remaining points?

  1. In the isolated topology above, which platform-supported request paths can reach the API listener besides the public HTTP edge and deployment healthchecks? Can services in another environment or project reach it privately?
  2. Does the public edge always replace caller-supplied X-Forwarded-Proto with https for generated service domains, including duplicate header fields? We do not intend to rely on the undocumented Forwarded header.
  3. Is there a supported, verifiable way to distinguish deployment healthchecks from public requests without depending on a fixed peer IP or a client-forgeable header? If not, please confirm so we can keep the health endpoint unprivileged and avoid treating apparent healthcheck origin as authorization.

Please point us to the current supported contract and any limitations. No project identifiers, credentials, logs, customer data or files are included because these are general platform questions. No resource changes or paid support are requested.

Thank you.

Solved

3 Replies

Railway
BOT

a month ago

Private networking is isolated per project and environment, so services in another environment or another project can't reach your listener over the private network. Services in the same environment can, but you have none. Requests through the public HTTP edge are covered below. A TCP proxy would be a separate path that passes raw bytes through without header sanitization, and you have none of those either. Beyond these, we don't offer an edge-only ingress switch, an mTLS identity your app can verify, or signed forwarding headers.

For generated service domains, the edge overwrites X-Forwarded-Proto with https and replaces any copies the caller sends. It does the same for X-Real-IP, X-Forwarded-For and X-Forwarded-Host. Forwarded is not part of that overwrite behavior.

Deployment healthchecks use the hostname healthcheck.railway.app and the PORT variable. They only run at the start of a deployment, before traffic switches over, not continuously. That hostname is something you can allow in host checks, not a verifiable proof of origin. There is no supported way to authenticate a request as a healthcheck without relying on a peer IP or a header. Keeping the health endpoint unprivileged, and not treating apparent healthcheck origin as authorization, is the right approach.

The public networking specs and healthcheck docs are the current reference, and the specs note that details may change.


Status changed to Awaiting User Response Railway • about 1 month ago


xuniuniu9119-art
OP

a month ago

Thank you. Could a Railway staff member please confirm the automated reply before we use it to finalize our deployment design?

The proposed topology is one API service in a dedicated environment, no other services in that environment, and no TCP proxy. We understand that every service able to reach the listener privately would be inside the trust boundary, even if it does not normally call the API.

Please confirm or correct these points:

  1. Other projects/environments cannot reach this listener over private networking; any other supported ingress paths or exceptions should be accounted for.
  2. On generated public service domains, caller-supplied X-Forwarded-Proto is replaced with https, including duplicate header fields. We will not trust the undocumented Forwarded header.
  3. Neither healthcheck.railway.app nor an observed peer IP authenticates a healthcheck. The health endpoint must remain unprivileged, and apparent healthcheck origin must never bypass business-endpoint authentication or authorization.

We are asking for confirmation of current supported behavior and its limitations, not a contractual SLA or any paid service. No changes to resources are requested. Thank you.


Status changed to Awaiting Railway Response Railway • about 1 month ago


a month ago

All three points match current behavior.


Status changed to Awaiting User Response brody • about 1 month ago


Railway
BOT

24 days 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 • 24 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...