26 lines
454 B
Caddyfile
26 lines
454 B
Caddyfile
{
|
|
# Disable automatic HTTPS for local development
|
|
auto_https off
|
|
}
|
|
|
|
:8080 {
|
|
encode gzip
|
|
|
|
# WebSocket SSH endpoint (keep full path)
|
|
handle /ws* {
|
|
reverse_proxy 127.0.0.1:8081
|
|
}
|
|
|
|
# HTTP API endpoints (preserve /api/* path)
|
|
handle /api/* {
|
|
reverse_proxy 127.0.0.1:8082
|
|
}
|
|
|
|
# Static files and SPA fallback
|
|
route {
|
|
root * /srv
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|
|
}
|