Files
lovdata-chat/nginx/Caddyfile
Torbjørn Lindahl 5a89f46e3d fix: replace per-path proxy with cookie-based catch-all routing
The /session/{id} URL prefix collided with OpenCode's internal
/session/{slug} SPA routes, causing a blank page. Now /c/{id} is
a thin entry point that sets a session cookie and redirects to /,
where the SPA loads at root with its router working correctly.

This also replaces ~50 individual per-path proxy route handlers
with a single /{path:path} catch-all, and simplifies the Caddyfile
from ~180 lines to ~17.
2026-02-16 10:40:17 +01:00

18 lines
507 B
Caddyfile

# Lovdata Chat Reverse Proxy Configuration
# Using HTTP for local development (no SSL warnings)
# Main web interface - HTTP only for development
:80 {
# API endpoints for session management (strip /api prefix)
handle /api/* {
uri strip_prefix /api
reverse_proxy session-manager:8000
}
# Everything else goes to session-manager (handles /c/{id} entry
# point and cookie-based proxy to OpenCode containers)
handle {
reverse_proxy session-manager:8000
}
}