From 640101c3258a989ee7c23b7a1ef60156302af558 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sun, 13 Sep 2026 06:52:40 +0000 Subject: [PATCH] fix(caddy): forward X-Forwarded-Proto https on the /mcp proxy Railway terminates TLS and Caddy sees plain HTTP, so the proto it forwards to the API is "http" and the relay's GET health reply advertised http://tronbrowser.dev/mcp/tron. Pin the header on the mcp route. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_018WGZpo8on6XLGYnccXV3dP --- Caddyfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Caddyfile b/Caddyfile index d7889f7..bea51ee 100644 --- a/Caddyfile +++ b/Caddyfile @@ -21,7 +21,11 @@ # is the static /.well-known/openmcp.json below, which is what makes the # listing "verified" on a catalog (served from this origin, not registered). @mcp path /mcp/* /mcp - reverse_proxy @mcp localhost:8090 + reverse_proxy @mcp localhost:8090 { + # Railway terminates TLS and Caddy sees plain HTTP, so the proto it + # forwards is "http"; the relay's health reply echoes the caller's scheme. + header_up X-Forwarded-Proto https + } # Security headers on every response. header {