本地调试代理配置:
proxy: {
'/api': {
target: 'https:/xxxx',
changeOrigin: true,
},
},
报错:
[HPM] Error occurred while trying to proxy request /admin/api/v1/upload from
localhost:8000 to https://xxxx (UNABLE_TO_VERIFY_LEAF_SIGNATURE)
(https://nodejs.org/api/errors.html#errors_common_system_errors)
解决:设置证书免校验
proxy: {
'/api': {
target: 'https:/xxxx',
changeOrigin: true,
"secure": false,
},
},
本文介绍在本地调试环境中配置代理时遇到的SSL证书验证错误(UNABLE_TO_VERIFY_LEAF_SIGNATURE),并提供了解决方案,即通过设置secure属性为false来跳过证书验证。
1042

被折叠的 条评论
为什么被折叠?



