forked from svrjs/svrjs
Fixed bug with non-standard code regex replacements
This commit is contained in:
parent
a2ecbe4c5a
commit
fccc0ef7ca
1 changed files with 1 additions and 1 deletions
2
svr.js
2
svr.js
|
@ -4231,7 +4231,7 @@ if (!cluster.isPrimary) {
|
||||||
// Regex match
|
// Regex match
|
||||||
var createdRegex = createRegex(nonStandardCodes[i].regex, true);
|
var createdRegex = createRegex(nonStandardCodes[i].regex, true);
|
||||||
isMatch = req.url.match(createdRegex) || href.match(createdRegex);
|
isMatch = req.url.match(createdRegex) || href.match(createdRegex);
|
||||||
regexI.push(createdRegex);
|
regexI[i] = createdRegex;
|
||||||
} else {
|
} else {
|
||||||
// Non-regex match
|
// Non-regex match
|
||||||
isMatch = nonStandardCodes[i].url == href || (os.platform() == "win32" && nonStandardCodes[i].url.toLowerCase() == href.toLowerCase());
|
isMatch = nonStandardCodes[i].url == href || (os.platform() == "win32" && nonStandardCodes[i].url.toLowerCase() == href.toLowerCase());
|
||||||
|
|
Reference in a new issue