connect-modrewrite
Advanced tools
Comparing version 0.3.8 to 0.3.9
{ | ||
"name": "connect-modrewrite", | ||
"main": "./src/modrewrite.js", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"description": "connect-modrewrite adds modrewrite functionality to connect/express server", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -47,3 +47,12 @@ module.exports = function(rules, normalize) { | ||
// Normalization process | ||
urlSplits.splice(0, referersSplits.length); | ||
var removes = 0; | ||
for( var i = 0; i < referersSplits.length; i++) { | ||
var urlIndex = i - removes; | ||
if(referersSplits[i] == urlSplits[urlIndex]) { | ||
urlSplits.splice(urlIndex, 1); | ||
removes++; | ||
} else { | ||
break; | ||
} | ||
} | ||
// Join back all splits | ||
@@ -50,0 +59,0 @@ req.url = '/' + urlSplits.join('/'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12224
229