version 1.43.2.7, 2020/09/06 19:29:00
|
version 1.50, 2020/01/06 15:47:10
|
Line 227 else {
|
Line 227 else {
|
} |
} |
my $hostname = Sys::Hostname::FQDN::fqdn(); |
my $hostname = Sys::Hostname::FQDN::fqdn(); |
my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost'); |
my $hostip = Socket::inet_ntoa(scalar(gethostbyname($hostname)) || 'localhost'); |
my @expected = ('RewriteEngine on', |
my @expected = ('RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:\/\/)', |
'RewriteCond %{HTTPS} =on', |
|
'RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)', |
|
'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)', |
'RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)', |
'RewriteRule ^/adm/wrapper/ext/(?!https:) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]', |
'RewriteRule ^/adm/wrapper/ext/(?!https:\/\/) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]', |
'RewriteCond %{REMOTE_ADDR} 127.0.0.1', |
'RewriteCond %{REMOTE_ADDR} 127.0.0.1', |
'RewriteRule (.*) - [L]'); |
'RewriteRule (.*) - [L]'); |
if (($hostip ne '') && ($hostip ne '127.0.0.1')) { |
if (($hostip ne '') && ($hostip ne '127.0.0.1')) { |
Line 285 else {
|
Line 283 else {
|
foreach my $item (@rewrites) { |
foreach my $item (@rewrites) { |
if (ref($item) eq 'ARRAY') { |
if (ref($item) eq 'ARRAY') { |
my $found = 0; |
my $found = 0; |
foreach my $line (@{$item}) { |
foreach my $item (@rewrites) { |
foreach my $match (@expected) { |
foreach my $match (@expected) { |
if ($match eq $line) { |
if ($match eq $item) { |
$found ++; |
$found ++; |
last; |
last; |
} |
} |
Line 295 else {
|
Line 293 else {
|
} |
} |
if ($found >= @expected) { |
if ($found >= @expected) { |
$gotrules = 1; |
$gotrules = 1; |
last; |
|
} |
} |
} |
} |
} |
} |