Commit 6e3eff9e authored by chenqikuai's avatar chenqikuai

代理ws

parent 5c6613be
...@@ -37,7 +37,7 @@ export default defineComponent({ ...@@ -37,7 +37,7 @@ export default defineComponent({
connectionState.error = false; connectionState.error = false;
initError.value = false; initError.value = false;
const fmp = new FzmMessageProtocol("ws://172.16.101.107:8888/sub"); const fmp = new FzmMessageProtocol(`ws://${window.location.host}/proxyWs/sub`);
const UserMsg = getUserMsg(); const UserMsg = getUserMsg();
if (!UserMsg) { if (!UserMsg) {
......
...@@ -7,6 +7,14 @@ module.exports = { ...@@ -7,6 +7,14 @@ module.exports = {
pathRewrite: { pathRewrite: {
'^/proxyApi': '', '^/proxyApi': '',
}, },
},
'/proxyWs': {
target: 'ws://172.16.101.107:8888',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/proxyWs': ''
}
} }
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment