Skip to content

Commit de49c0b

Browse files
ralyodioclaude
andauthored
fix(caddy): forward X-Forwarded-Proto https on the /mcp proxy (#100)
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. Claude-Session: https://claude.ai/code/session_018WGZpo8on6XLGYnccXV3dP Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 40c2dab commit de49c0b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Caddyfile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
# is the static /.well-known/openmcp.json below, which is what makes the
2222
# listing "verified" on a catalog (served from this origin, not registered).
2323
@mcp path /mcp/* /mcp
24-
reverse_proxy @mcp localhost:8090
24+
reverse_proxy @mcp localhost:8090 {
25+
# Railway terminates TLS and Caddy sees plain HTTP, so the proto it
26+
# forwards is "http"; the relay's health reply echoes the caller's scheme.
27+
header_up X-Forwarded-Proto https
28+
}
2529

2630
# Security headers on every response.
2731
header {

0 commit comments

Comments
 (0)