fix : websocket代理

This commit is contained in:
2024-08-17 15:33:42 +08:00
parent aa1eacc423
commit f5f178f2a2
5 changed files with 24 additions and 10 deletions

View File

@@ -58,9 +58,12 @@ export default defineConfig({
strictPort: false,
open: true,
proxy: {
// '/api/tunnel': {
// // target: 'http://gateway.feashow.cn',
// target: 'http://192.168.31.175:8000',
// // '/api/tunnel': {
// '/tunnel': {
//
// // // target: 'http://gateway.feashow.cn',
// target: 'http://frp.feashow.cn:31800/',
// // target: 'http://clay.frp.feashow.cn',
// changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ''),
// },
@@ -72,13 +75,20 @@ export default defineConfig({
// },
'/api': {
target: 'http://web-tunnel.feashow.com/api',
// target: 'http://192.168.31.175:8000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'/socket': {
target: 'ws://web-tunnel.feashow.com/api/notice-ws/notice',
ws: true
},
'/websocket': {
target: 'ws://web-tunnel.feashow.com/api/wstunnel/websocket/equipment',
// target: 'ws://192.168.31.176:9000/websocket/debug',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(/^\/websocket/, '')
}
}
}