code review: disregard case-matching in redirection filters

This commit is contained in:
gorhill 2016-01-27 12:42:46 -05:00
parent 18ed625f0e
commit 2d502076d6

View file

@ -129,7 +129,7 @@ RedirectEngine.prototype.lookup = function(context) {
for ( rule in rules ) { for ( rule in rules ) {
pattern = rules[rule]; pattern = rules[rule];
if ( pattern instanceof RegExp === false ) { if ( pattern instanceof RegExp === false ) {
pattern = rules[rule] = new RegExp(pattern); pattern = rules[rule] = new RegExp(pattern, 'i');
} }
if ( pattern.test(reqURL) ) { if ( pattern.test(reqURL) ) {
return (this.resourceNameRegister = rule); return (this.resourceNameRegister = rule);