我有一个角度应用程序和一个 web api。要在本地进行测试,我使用代理配置文件:proxy.conf.json
{
"/api": {
"target": {
"host": "localhost",
"protocol": "http:",
"port": 50565
},
"secure": false,
"changeOrigin": false,
"logLevel": "info"
}
}
一切正常。最近我更新到ng6。从那时起,我收到以下错误:
[HPM] 尝试将请求 /api/data/GetCurrentUser/ 从 localhost:4200 代理到http://localhost:50565时发生错误(ECONNREFUSED)
知道这里发生了什么吗?(我使用 ng serve --proxy-config proxy.conf.json)