尝试从本地主机设置代理到http s 站点时看到以下错误
[HPM] Error occurred while trying to proxy request /api/analytics/getDataByPage from localhost:8080 to https://example.com:19502 (SELF_SIGNED_CERT_IN_CHAIN) (https://nodejs.org/api/errors.html#errors_common_system_errors)
答案 0 :(得分:0)
设置,secure: false
解决了该问题:
proxy: [
{
context: ["/api/**"],
secure: false, // had an expression which was resolving to true
changeOrigin: true,
}
]