|
|
@ -284,11 +284,12 @@ sub grant { |
|
|
|
) |
|
|
|
) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ( $uri =~ $class->tsv->{locationRegexp}->{$vhost}->[$i] ) { |
|
|
|
if ( $uri =~ $class->tsv->{locationRegexp}->{$vhost}->[$i] ) { |
|
|
|
|
|
|
|
my $match = [ undef, @{^CAPTURE} ] || []; |
|
|
|
$class->logger->debug( 'Regexp "' |
|
|
|
$class->logger->debug( 'Regexp "' |
|
|
|
. $class->tsv->{locationConditionText}->{$vhost}->[$i] |
|
|
|
. $class->tsv->{locationConditionText}->{$vhost}->[$i] |
|
|
|
. '" match' ); |
|
|
|
. '" match' ); |
|
|
|
return $class->tsv->{locationCondition}->{$vhost}->[$i] |
|
|
|
return $class->tsv->{locationCondition}->{$vhost}->[$i] |
|
|
|
->( $req, $session ); |
|
|
|
->( $req, $session, $match ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
unless ( $class->tsv->{defaultCondition}->{$vhost} ) { |
|
|
|
unless ( $class->tsv->{defaultCondition}->{$vhost} ) { |
|
|
@ -298,7 +299,7 @@ sub grant { |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
$class->logger->debug("$vhost: Apply default rule"); |
|
|
|
$class->logger->debug("$vhost: Apply default rule"); |
|
|
|
return $class->tsv->{defaultCondition}->{$vhost}->( $req, $session ); |
|
|
|
return $class->tsv->{defaultCondition}->{$vhost}->( $req, $session, [] ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
## @rmethod protected int forbidden(string uri) |
|
|
|
## @rmethod protected int forbidden(string uri) |
|
|
|