diff --git a/lib/node-http-proxy/proxy-table.js b/lib/node-http-proxy/proxy-table.js index d93f082f4..0cdce50a5 100644 --- a/lib/node-http-proxy/proxy-table.js +++ b/lib/node-http-proxy/proxy-table.js @@ -140,7 +140,7 @@ ProxyTable.prototype.getProxyLocation = function (req) { var pathSegments = route.path.split('/'); - if (pathSegments.length > 0) { + if (pathSegments.length > 1) { // don't include the proxytable path segments in the proxied request url pathSegments = new RegExp("/" + pathSegments.slice(1).join('/')); req.url = req.url.replace(pathSegments, ''); @@ -170,4 +170,4 @@ ProxyTable.prototype.close = function () { if (typeof this.routeFile === 'string') { fs.unwatchFile(this.routeFile); } -}; \ No newline at end of file +};