mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Fix incorrect depth check.
This commit is contained in:
parent
c03a450d9b
commit
3ab02f3ad7
@ -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, '');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user