报错:
[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 不能少。