4 days ago
Could a Railway networking or support team member confirm whether, in a dedicated environment with a single service, a Railway-managed public domain and no TCP proxy, the service’s HTTP listener can be reached only through Railway’s public HTTPS edge? Is there a supported way for the app to verify the request came from the edge, rather than trusting X-Forwarded-Proto alone? If the answer depends on a plan or network setting, please specify. A link to the supported guarantee would help. Thank you.
3 Replies
4 days ago
No, we don't guarantee that. Even with a single service and no TCP proxy, the HTTP listener is also reachable over that environment's private network (*.railway.internal). Those requests don't pass through the public edge, and the caller can set its own forwarding headers. Our private networks are isolated between projects and environments, so in a dedicated single-service environment the only other path is from services you add to that environment. That is a matter of isolation, though, not an edge-only ingress setting, and it doesn't depend on your plan.
For requests that do come through the public edge, including .up.railway.app domains, we overwrite X-Real-IP, X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host, so any values a caller sends are replaced. We don't offer a signed header, an mTLS identity the app can see, or a published, stable range of proxy source addresses that the app could use to verify a request came from the edge. The socket peer address you see today may change, so it shouldn't be hard-coded as a trusted range.
Public TLS ends at the edge, and traffic from the edge to your service travels over an encrypted WireGuard tunnel. The documented header behavior is in our public networking specifications, and the isolation model is described in how private networking works.
Status changed to Awaiting User Response Railway • 4 days ago
4 days ago
Thanks, that clarifies the public HTTP edge. The TCP Proxy docs say the assigned external port must be used even with a custom hostname. Does Railway support any production configuration where a browser connects to a custom domain on standard port 443 and TLS is passed through to, and terminated by, the application using its own certificate? If not, can you confirm there is no supported port-443 TLS passthrough option? A link to the relevant documentation would be helpful.
Status changed to Awaiting Railway Response Railway • 4 days ago
4 days ago
Neither of the two public ingress paths gives you that combination. On HTTP domains, including custom domains on port 443, we terminate TLS at our edge with our own certificate and forward plain HTTP/1.1 to your app over the encrypted internal tunnel, so the app never terminates the browser's TLS session. TCP Proxy does pass the raw byte stream through, so your app could terminate TLS with its own certificate, but the external port is the one we assign, and a custom hostname only replaces the domain, not the port.
So with the documented options, a browser on standard port 443 always connects to our edge's TLS, and app-terminated TLS is only possible on the assigned TCP Proxy port. The relevant pages are the TCP Proxy docs (see "Using a custom domain for TCP proxying") and the public networking specifications.
Status changed to Awaiting User Response Railway • 4 days ago