diff options
| author | admin (deltavega) <deltavega@mx.buetow.org> | 2018-12-22 13:45:48 +0100 |
|---|---|---|
| committer | admin (deltavega) <deltavega@mx.buetow.org> | 2018-12-22 13:45:48 +0100 |
| commit | c0a01cfcce16376b75fa0860a1fdf30d7d50b482 (patch) | |
| tree | fc4b655692364fbfd37fbf6c19fa8c329b0fd558 | |
| parent | 6a6593805d71f6cab99f9aa1de64ddb43fd57e09 (diff) | |
use different style when connected via ipv6
| -rw-r--r-- | Xerl/Setup/Configure.pm | 13 | ||||
| -rw-r--r-- | xerl.conf | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Xerl/Setup/Configure.pm b/Xerl/Setup/Configure.pm index f58b51b..e490c82 100644 --- a/Xerl/Setup/Configure.pm +++ b/Xerl/Setup/Configure.pm @@ -40,6 +40,8 @@ sub parse { sub defaults { my $self = $_[0]; + $self->set_is_ipv6( $ENV{REMOTE_ADDR} =~ /:/ ? 1 : 0 ); + $self->set_proto('http') if exists $ENV{HTTPS}; $self->set_site( $self->get_defaultcontent() ) @@ -50,8 +52,13 @@ sub defaults { $self->set_template( $self->get_defaulttemplate() ) unless $self->template_exists(); - $self->set_style( $self->get_defaultstyle() ) - unless $self->style_exists(); + unless ($self->style_exists()) { + if ($self->get_is_ipv6()) { + $self->set_style( $self->get_ipv6style() ) + } else { + $self->set_style( $self->get_defaultstyle() ) + } + } $self->set_proto( $self->get_defaultproto() ) unless $self->proto_exists(); @@ -129,8 +136,6 @@ sub defaults { $self->set_contentpath( $self->get_hostpath() . 'content/' ); - $self->set_is_ipv6( $ENV{REMOTE_ADDR} =~ /:/ ? 1 : 0 ); - return undef; } @@ -12,6 +12,7 @@ defaulthost=default defaultoutputformat=html5 defaultproto=http defaultstyle=css3.css +ipv6style=css3-ipv6.css defaulttemplate=html5 hidesubhome=1 hostroot=/var/www/xerlhosts/ |
