fix proxy configuration en vite.config.ts
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:
@@ -12,11 +12,11 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/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
|
||||
},
|
||||
'/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,
|
||||
ws: true,
|
||||
rewrite: (path) => path.replace(/^\/ws/, '')
|
||||
|
||||
Reference in New Issue
Block a user