【发布时间】:2021-06-12 20:04:30
【问题描述】:
我需要将来自 localhost 的请求代理到 HTTPS 后端。我使用文档中的这段代码:
{
"/api": {
"target": "https://my-domain",
"secure": false,
"logLevel": "debug",
"pathRewrite": {
"^/api": "/env/api"
}
}
}
但是它返回一个错误:
[HPM] 尝试将请求 /env/api/my/url/ 从 localhost:4200 代理到 https://my-domain (EPROTO) (https://nodejs.org/api/errors.html#errors_common_system_errors) 时出错
【问题讨论】: