报错:
[HPM] Error occurred while trying to proxy request /oauth/validate from localhost:8080 to localhost:8081 (ENOTFOUND) (https://nodejs.org/api/errors.html#errors_common_system_errors)
设置代理:
'/xxxxx': {
target:"localhost:8081",
changeOrigin: true, //可否跨域
pathRewrite: {
'^/xxxxx': '' //重写接口,去掉/paas
}
}
代理要是完整的url, http://localhost:8081, http 不能少。
本文详细解析了在使用HPM进行代理请求时遇到的ENOTFOUND错误,并提供了具体的配置解决方案,包括如何正确设置代理目标URL及跨域处理。
4410

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



