let vite be the proxy to the dev server (#1630)

This commit is contained in:
Alex Christoffer Rasmussen
2025-06-09 12:34:18 +02:00
committed by Carlos Valente
parent 62c8319d70
commit c41fe824cf
2 changed files with 30 additions and 4 deletions
+1 -4
View File
@@ -49,10 +49,7 @@ function resolveUrl(protocol: 'http' | 'ws', path: string) {
url.pathname = baseURI ? `${baseURI}/${path}` : path;
// in development mode, we use the React port for UI, but need the requests to target the server
if (isDev) {
// this is used as a fallback port for development
url.port = '4001';
}
// this is done with a proxy in the vite config to avoid CORS issues in the dev environment
const result = url.toString();