When the AO dashboard is served behind a reverse proxy (e.g. Caddy -> FastAPI -> Next.js), the browser cannot reach the direct terminal WebSocket server on port 14801. The connection attempt to wss://hostname:14801/ws times out, leaving terminals stuck at 'Connecting...'. Fix: detect when running on a standard port (443/80, indicating a reverse proxy) and use a path-based WebSocket endpoint (/ao-terminal-ws) instead of the direct port. This allows the proxy to forward WebSocket connections to the terminal server. Supports three modes: 1. NEXT_PUBLIC_TERMINAL_WS_PATH env var (explicit path override) 2. Auto-detect reverse proxy (standard port -> /ao-terminal-ws) 3. Direct port access (dev mode, non-standard port -> :14801) |
||
|---|---|---|
| .. | ||
| e2e | ||
| screenshots | ||
| server | ||
| src | ||
| .env.local.example | ||
| .gitignore | ||
| next-env.d.ts | ||
| next.config.js | ||
| package.json | ||
| postcss.config.mjs | ||
| tsconfig.json | ||
| vitest.config.ts | ||