Insert applied rule number in logs (debug mode)
This commit is contained in:
parent
cdafff7458
commit
d20489ba9a
|
@ -1505,9 +1505,12 @@ sub isUnprotected {
|
|||
sub grant {
|
||||
my ( $class, $uri ) = splice @_;
|
||||
for ( my $i = 0 ; $i < $locationCount ; $i++ ) {
|
||||
return &{ $locationCondition->[$i] }($datas)
|
||||
if ( $uri =~ $locationRegexp->[$i] );
|
||||
if ( $uri =~ $locationRegexp->[$i] ) {
|
||||
$class->lmLog( 'debug', 'Regexp ' . ( $i + 1 ) . ' match' );
|
||||
return &{ $locationCondition->[$i] }($datas);
|
||||
}
|
||||
}
|
||||
$class->lmLog( 'debug', 'Apply default rule' );
|
||||
return &$defaultCondition($datas);
|
||||
}
|
||||
|
||||
|
|
|
@ -173,6 +173,7 @@ sub grant {
|
|||
my $vhost = $apacheRequest->hostname;
|
||||
for ( my $i = 0 ; $i < $locationCount->{$vhost} ; $i++ ) {
|
||||
if ( $uri =~ $locationRegexp->{$vhost}->[$i] ) {
|
||||
$class->lmLog( 'debug', "$vhost: Regexp " . ( $i + 1 ) . ' match' );
|
||||
return &{ $locationCondition->{$vhost}->[$i] }($datas);
|
||||
}
|
||||
}
|
||||
|
@ -183,6 +184,7 @@ sub grant {
|
|||
);
|
||||
return 0;
|
||||
}
|
||||
$class->lmLog( 'debug', "$vhost: Apply default rule" );
|
||||
return &{ $defaultCondition->{$vhost} }($datas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user