I need a HTTP-Proxy to access an external API while I\'m developing to get around cross domain security restrictions.
I found some example code here: http://nthloop.
Local server is getting stuck because the middleware does not delegate handling of cases when the if condition fails further down the middleware chain :
The following should solve the problem :
.use(function(req, res, next) {
if (req.url.indexOf(endpoint.prefix) === 0) {
proxy.proxyRequest(req, res, endpoint);
} else next();
})