64 lines
1.4 KiB
Caddyfile
64 lines
1.4 KiB
Caddyfile
# Lovdata Chat Reverse Proxy Configuration
|
|
# Using HTTP for local development (no SSL warnings)
|
|
|
|
# Main web interface - HTTP only for development
|
|
http://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}* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
# OpenCode SPA runtime requests - route based on session cookie
|
|
handle /global/* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /assets/* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /provider/* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /provider {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /project {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /path {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /find/* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /file {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
handle /file/* {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
# Health check
|
|
handle /health {
|
|
reverse_proxy session-manager:8000
|
|
}
|
|
|
|
# Static files and main interface (fallback)
|
|
handle /* {
|
|
try_files {path} {path}/ /index.html
|
|
file_server
|
|
}
|
|
} |