27 lines
662 B
Caddyfile
27 lines
662 B
Caddyfile
# Lovdata Chat Reverse Proxy Configuration
|
|
|
|
# Main web interface
|
|
localhost {
|
|
# API endpoints for session management
|
|
handle /api/* {
|
|
uri strip_prefix /api
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
# Session-specific routing - proxy to session manager for dynamic routing
|
|
handle /session/{session_id}* {
|
|
# Keep the full path including session ID for routing
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
# Static files and main interface
|
|
handle /* {
|
|
try_files {path} {path}/ /index.html
|
|
file_server
|
|
}
|
|
|
|
# Health check
|
|
handle /health {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
} |