vue把http请求换成https

// 打开vue.config.js
// 首先把请求换成https,然后添加https:true
 devServer: {
    compress: true, // 启用gzip压缩
    noInfo: true,
    overlay: true,
    open: true,
    proxy: {
      // 配置跨域
      "/api/v1/": {
        ws: true,
        target: "https://192.168.1.60",
        changOrigin: true,
      },
      https:true // 同意使用https
    },

你可能感兴趣的:(vue.js,javascript,前端)