From 26d4de46baef74805a0a393cdd038d90daaf3c03 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Mon, 22 Mar 2021 00:42:58 +0100 Subject: [PATCH] Update boot.php --- boot.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 @@ } + +