feat: 添加query WS的功能

This commit is contained in:
2024-09-28 18:35:50 +08:00
parent 632d164087
commit ed178ee4c6
11 changed files with 239 additions and 13 deletions

View File

@@ -9,10 +9,17 @@ export default defineConfig({
port: 6102,
// host: '::',
proxy: {
'/api/router': {
target: 'http://127.0.0.1:3003',
'/api': {
target: 'http://127.0.0.1:4000',
changeOrigin: true,
},
'/api/router': {
target: 'ws://localhost:4000',
changeOrigin: true,
ws: true,
rewriteWsOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
},
},
},
// define: {