Using webpack2 to compile on the fly an angular application, I configured devServer
this way:
proxy: {
'/api': {
target: 'http://localhost:52163'
}
}
The target of the proxy is a IIS Express server. After upgrading from Visual Studio 2012 to 2017, I now get the error ECONNREFUSED
when trying to access /api
.
I changed http-proxy-middleware
to get more information about the error and noticed it tries to connect to 127.0.0.1
instead of localhost
.
How can I ensure http-proxy-middleware
connects to localhost
?
Thanks