diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 762301b..a5470c5 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -10,11 +10,22 @@ server { # Proxy API requests to the backend location /api/ { - proxy_pass http://backend:8080/; + proxy_pass http://backend:8081/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } + + # Proxy WebSocket connections + location /ws { + proxy_pass http://backend:8081; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_read_timeout 86400s; + } } diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 299ba31..0e7f3e5 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -15,9 +15,13 @@ export default defineConfig({ host: true, proxy: { '/api': { - target: 'http://backend:8080', + target: 'http://backend:8081', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '') + }, + '/ws': { + target: 'http://backend:8081', + ws: true } } }