We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c03a450 commit 3ab02f3Copy full SHA for 3ab02f3
lib/node-http-proxy/proxy-table.js
@@ -140,7 +140,7 @@ ProxyTable.prototype.getProxyLocation = function (req) {
140
141
var pathSegments = route.path.split('/');
142
143
- if (pathSegments.length > 0) {
+ if (pathSegments.length > 1) {
144
// don't include the proxytable path segments in the proxied request url
145
pathSegments = new RegExp("/" + pathSegments.slice(1).join('/'));
146
req.url = req.url.replace(pathSegments, '');
@@ -170,4 +170,4 @@ ProxyTable.prototype.close = function () {
170
if (typeof this.routeFile === 'string') {
171
fs.unwatchFile(this.routeFile);
172
}
173
-};
+};
0 commit comments