diff --git a/boot.php b/boot.php index f15e6b2..fc2fd19 100644 --- a/boot.php +++ b/boot.php @@ -38,8 +38,9 @@ } // Ausgabe abbrechen, wenn der übermittelte Code nicht stimmt. if (rex::isFrontend() and $addon->getConfig('frontend_aktiv') != 'Deaktivieren' and $secret == '') { - $ips = ""; - $admin = ""; + $ips = []; + $domains = []; + $admin = false; $ips = explode(", ", $this->getConfig('ip')); $domains = explode(", ", $this->getConfig('domains')); @@ -64,7 +65,10 @@ if (!$session) { $redirect = "aktiv"; } - if (in_array($_SERVER['SERVER_NAME'], $domains)) + + $current_domain = str_replace("www.", "", $_SERVER['SERVER_NAME']); + + if (in_array($current_domain, $domains)) { $redirect = 'inaktiv'; } @@ -142,3 +146,5 @@ } + +