diff --git a/frontend/vite.config.js b/frontend/vite.config.js index d91e52342..a30126508 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -289,10 +289,11 @@ export default defineConfig({ '^/(?:[^/]+/)?(login|logout|getTwoFactorEnable|csrf-token|sponsors|panel|server)(?:/|$)': makeBackendProxy(BACKEND_TARGET), '^/$': makeBackendProxy(BACKEND_TARGET), '^/[^/]+/$': makeBackendProxy(BACKEND_TARGET), + // No changeOrigin: the panel rejects an upgrade whose Origin port differs + // from the Host port, so Host must stay the dev server the page came from. '^/(?:[^/]+/)?ws$': { target: 'ws://localhost:2053', ws: true, - changeOrigin: true, rewrite: rewriteToBackend, }, },