- enable changeOrigin for /mini proxy - add new websocket proxy /mini-ws pointing to ws://localhost:10086/ws - add rewrite rule for /mini-ws proxy to remove prefix
@@ -17,9 +17,14 @@ export default defineConfig({
proxy: {
'/mini': {
target: 'http://localhost:10086',
- // changeOrigin: true,
+ changeOrigin: true,
+ },
+ '/mini-ws': {
+ target: 'ws://localhost:10086/ws',
+ rewrite: path => path.replace(/^\/mini-ws/, ''),
ws: true
- }
}
},
// 配置 @ 别名