流浪のwolf

卷帝

导航

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

控制台报错:

 

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,
})

posted on 2022-09-24 14:31  流浪のwolf  阅读(5454)  评论(0编辑  收藏  举报