diff --git a/svr.js b/svr.js index b8f3119..1360963 100644 --- a/svr.js +++ b/svr.js @@ -4177,24 +4177,41 @@ if (!cluster.isPrimary) { } // Handle URL rewriting - function rewriteURL(address, map, callback) { + function rewriteURL(address, map, callback, _fileState, _mapBegIndex) { var rewrittenURL = address; if (!isProxy) { - map.every(function (mapEntry) { - if (matchHostname(mapEntry.host) && createRegex(mapEntry.definingRegex).test(address)) { + var doCallback = true; + for(var i=(_mapBegIndex ? _mapBegIndex : 0);i