首页 > 其他分享 >解决 WebSocketClient.js?5586:16 WebSocket connection to 'ws://192.168.13.25:8080/ws' failed:

解决 WebSocketClient.js?5586:16 WebSocket connection to 'ws://192.168.13.25:8080/ws' failed:

时间:2022-09-24 14:46:52浏览次数:81  
标签:5586 WebSocket WebSocketClient 0.0 192.168 js ws

控制台报错:

 

vue.config.js Vue的配置文件

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  devServer: {
    host: '0.0.0.0',
    // https:true,
    port: 6103,
    client: {
      webSocketURL: 'ws://0.0.0.0:6103/ws',
    },
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
  },
  transpileDependencies: true,
  lintOnSave: false,
})

标签:5586,WebSocket,WebSocketClient,0.0,192.168,js,ws
From: https://www.cnblogs.com/zhulongxu/p/16725604.html

相关文章