From d7affc043f95f676caa1a2fea307c8205be7cace Mon Sep 17 00:00:00 2001 From: Martijn <12066560+Kipjr@users.noreply.github.com> Date: Thu, 31 Aug 2023 09:05:25 +0200 Subject: [PATCH] Development (#28) * Fix: boolean * add .env to .gitignore * Fix: Debug env variables * Fix: Debug texts * Fix: when imagick is not installed * fix debug message * add content-type to prices.php --- src/html/index.php | 21 +++++++++++---------- src/html/prices.php | 1 + 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/html/index.php b/src/html/index.php index 25358fb..4dc9870 100644 --- a/src/html/index.php +++ b/src/html/index.php @@ -49,19 +49,20 @@ function isAllowed($ip){ if(! isAllowed($RemoteIP)) { if(MW_DEBUG !=True){ header('Location: about:blank'); + die; } else { - echo "
";
-        echo $OutputString;
-        echo "MW_DEBUG: " . (MW_DEBUG === True) . "\n";
-        if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { echo "HTTP_X_FORWARDED_FOR: " . $_SERVER['HTTP_X_FORWARDED_FOR'] . "
"; } - echo "REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "
" . "MW_IP_WHITELIST:"; - print_r(MW_IP_WHITELIST); - echo "
"; + echo 'Help, I\'m not allowed! ( Not IP whitelisted)'; } -} else{ - // } - +if(MW_DEBUG ==True){ + echo "
";
+    echo $OutputString;
+    echo "MW_DEBUG: " . (MW_DEBUG === True) . "\n";
+    if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { echo "HTTP_X_FORWARDED_FOR: " . $_SERVER['HTTP_X_FORWARDED_FOR'] . "
"; } + echo "REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "
" . "MW_IP_WHITELIST:"; + print_r(MW_IP_WHITELIST); + echo "
"; +} ?> diff --git a/src/html/prices.php b/src/html/prices.php index 66ee8d4..b8378f4 100644 --- a/src/html/prices.php +++ b/src/html/prices.php @@ -1,5 +1,6 @@