vue,https协议本地调试代理配置控制台报错 UNABLE_TO_VERIFY_LEAF_SIGNATURE
摘要:记录一次vue测试环境代理接口报错Error occured while trying to proxy to: localhost:8002//api/AdminMenu/menuLis这个错误的bug公司项目更换了域名,从http协议更换到了https协议,然后查看network出现了上述错误,然后各种百度这个错误怎么解决,大致有这几种解决办法,重新更新node,端口呗占用修改端口,..
·
摘要:记录一次vue测试环境代理接口报错Error occured while trying to proxy to: localhost:8002//api/AdminMenu/menuLis这个错误的bug
公司项目更换了域名,从http协议更换到了https协议,然后查看network出现了上述错误,然后各种百度这个错误怎么解决,大致有这几种解决办法,重新更新node,端口呗占用修改端口,最骚的居然tm有更新npm,真是神奇。
尝试了一溜十三招,各种不好使。最终无意间在vscode的控制台看到了这个报错
Error occurred while trying to proxy request //api/AdminMenu/menuList from localhost:8003 to https://www.lat.tips/ (UNABLE_TO_VERIFY_LEAF_SIGNATURE) (https://nodejs.org/api/errors.html#errors_common_system_errors)
最终解决了,反正是测试环境,不校验ssl证书即可,嘿嘿
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': {
target: 'https://xxxxx/',
changeOrigin: true,
secure: false,//重点是这个参数,不校验证书
pathRewrite: {
'^/proxyApi/': '/'
}
}
},
更多推荐
已为社区贡献3条内容
所有评论(0)