File size: 719 Bytes
a5e5c66 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Caddyfile — HF Spaces reverse proxy
# OpenClaw :18889 (internal) ← main API
# cc-switch-web :3000 (internal) ← Web UI
# External port from $PORT environment variable
:{env.PORT} {
# cc-switch-web Web UI
handle /ccswitch/* {
uri strip_prefix /ccswitch
reverse_proxy localhost:3000
}
handle /ccswitch {
redir /ccswitch/ 308
}
# OpenClaw Gateway (API + Control UI)
handle {
reverse_proxy localhost:18889 {
# WebSocket support for OpenClaw
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}
} |