Skip to content

Commit

Permalink
Update boot.php
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis authored Mar 21, 2021
1 parent b7e6b92 commit 26d4de4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand All @@ -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';
}
Expand Down Expand Up @@ -142,3 +146,5 @@
}




0 comments on commit 26d4de4

Please sign in to comment.