为webSocket特定路径添加直接代理规则

This commit is contained in:
2025-07-29 17:48:43 +08:00
parent cb6fd3f57e
commit 5c42bf666a

View File

@@ -43,6 +43,21 @@ module.exports = {
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
},
// 直接代理WebSocket相关路径
'/websocket': {
target: `http://localhost:8080`,
changeOrigin: true
},
// 直接代理测试路径
'/test': {
target: `http://localhost:8080`,
changeOrigin: true
},
// 直接代理actuator路径
'/actuator': {
target: `http://localhost:8080`,
changeOrigin: true
}
},
disableHostCheck: true