From 33fd656c876056a4259480e2ac98b2ca15df29d9 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Sun, 15 Jan 2023 02:37:14 +0100 Subject: [PATCH] Added check if frontend --- boot.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 954197f..4fce7b9 100644 --- a/boot.php +++ b/boot.php @@ -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');