Shorter lines and more explicit default
This commit is contained in:
parent
0975b22582
commit
a3ae6c51f4
@ -138,7 +138,9 @@ sub register {
|
|||||||
$self->{_args}{db_dir} ||= '/usr/local/share/GeoIP';
|
$self->{_args}{db_dir} ||= '/usr/local/share/GeoIP';
|
||||||
|
|
||||||
$self->load_geoip() or return;
|
$self->load_geoip() or return;
|
||||||
return if defined $self->{_args}{add_headers} and $self->{_args}{add_headers} !~ /false/i;
|
my $enabled = $self->{_args}{add_headers};
|
||||||
|
$enabled = 'true' if ! defined $enabled;
|
||||||
|
return if $enabled =~ /false/i;
|
||||||
$self->register_hook( data_post => 'add_headers' );
|
$self->register_hook( data_post => 'add_headers' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user