首页 > 其他分享 >2023.01.03 - vue项目开启https调试

2023.01.03 - vue项目开启https调试

时间:2023-01-03 10:23:33浏览次数:64  
标签:03 vue 项目 2023.01 开启 https true

vue-cli3.x 项目:
使用vue脚手架3.x搭建的项目,配置开启https方法比较简单,在项目根目录下的vue.config.js文件中增加属性 https: true 即可。

// vue.config.js
module.exports = {
 devServer: {
   proxy: {
     '/api': {
       target: 'url',
       changeOrigin: true,
       pathRewrite: {
         '^/api': ''
       }
     }
   },
   // 此处开启 https
   https: true
 }
}

原文参考链接:https://blog.csdn.net/l508742729/article/details/107820099

标签:03,vue,项目,2023.01,开启,https,true
From: https://www.cnblogs.com/yehuda/p/17021258.html

相关文章