当前位置:
首页 >
行业知识 >
vue项目显示 WebSocketClient.js:13 WebSocket connection to ‘ws://192.168.1.5:8089/ws‘ failed: Invalid fr
行业知识
vue项目显示 WebSocketClient.js:13 WebSocket connection to ‘ws://192.168.1.5:8089/ws‘ failed: Invalid fr
2026-10-31 19:04:14
来源:互联网转载
���也不懂,这个可以解决 ws:false
()const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
()transpileDependencies: true,
devServer: {
open: false,
host: '0.0.0.0',
port: 8089,
hot: true,
https: false,
proxy: {
'/': {
target: 'http://localhost:7776',
ws: false, // 添加该配置以支持 WebSocket 代理
changeOrigin: true,
pathRewrite: {
'^/': '/'
}
}
}
}
})
下一篇:服务器太吵怎么删除软件?