fix proxy configuration en vite.config.ts
All checks were successful
build-and-deploy / build (push) Successful in 19s
build-and-deploy / deploy (push) Successful in 10s

Corrige los proxies de /api y /ws para apuntar al servidor Colyseus
en puerto 2567 en lugar del puerto 3000. Esto resuelve el problema
de que las APIs del admin devolvían HTML en lugar de JSON.
This commit is contained in:
2025-08-16 01:45:28 -06:00
parent 3ebbc02cd1
commit 8c9697e96b

View File

@@ -12,11 +12,11 @@ export default defineConfig({
}, },
proxy: { proxy: {
'/api': { '/api': {
target: process.env.VITE_DEV_API_PROXY_TARGET || 'http://localhost:3000', target: process.env.VITE_DEV_API_PROXY_TARGET || 'http://localhost:2567',
changeOrigin: true changeOrigin: true
}, },
'/ws': { '/ws': {
target: process.env.VITE_DEV_WS_PROXY_TARGET || 'http://localhost:3000', target: process.env.VITE_DEV_WS_PROXY_TARGET || 'http://localhost:2567',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(/^\/ws/, '') rewrite: (path) => path.replace(/^\/ws/, '')