diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index ec4be6f..0961f6c 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -18,5 +18,20 @@ export default defineConfig({ '.lab.home.lucasacchi.net', // Allow all subdomains 'logwhispererai.lab.home.lucasacchi.net', ], + // HMR configuration - disabled when running behind reverse proxy + // HMR causes issues with WebSocket through HTTPS reverse proxy + hmr: process.env.NODE_ENV === 'production' ? false : { + // Use polling instead of WebSocket for HMR (more compatible with reverse proxy) + protocol: 'wss', + host: 'logwhispererai.lab.home.lucasacchi.net', + port: 443, + clientPort: 443, + }, + // CORS configuration + cors: { + origin: '*', + methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], + allowedHeaders: ['Content-Type', 'Authorization'], + }, }, })