Skip to content

Commit

Permalink
Added check if frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis authored Jan 15, 2023
1 parent c2b72a8 commit 33fd656
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
*/
// stop if Setup is active
if (rex::isSetup()) return;
$req = $_SERVER['REQUEST_URI'];
$addon = rex_addon::get('maintenance');

if (str_contains($req, 'sitemap.xml') === true && str_contains($req, 'secret='.$addon->getConfig('secret'))) {
return;
$addon = rex_addon::get('maintenance');
if (rex::isFrontend()){
$req = $_SERVER['REQUEST_URI'];
if (str_contains($req, 'sitemap.xml') === true && str_contains($req, 'secret='.$addon->getConfig('secret'))) {
return;
}
}
$secret = '';
$responsecode = $addon->getConfig('responsecode');
Expand Down

0 comments on commit 33fd656

Please sign in to comment.