Skip to content

Commit

Permalink
Development (#28)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Kipjr authored Aug 31, 2023
1 parent ae341ca commit d7affc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,20 @@ function isAllowed($ip){
if(! isAllowed($RemoteIP)) {
if(MW_DEBUG !=True){
header('Location: about:blank');
die;
} else {
echo "<pre>";
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'] . "<br>"; }
echo "REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "<br>" . "MW_IP_WHITELIST:";
print_r(MW_IP_WHITELIST);
echo "</pre>";
echo 'Help, I\'m not allowed! ( Not IP whitelisted)';
}
} else{
//
}

if(MW_DEBUG ==True){
echo "<pre>";
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'] . "<br>"; }
echo "REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "<br>" . "MW_IP_WHITELIST:";
print_r(MW_IP_WHITELIST);
echo "</pre>";
}

?>
<!DOCTYPE html>
Expand Down
1 change: 1 addition & 0 deletions src/html/prices.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
require_once('core.php');
header('Content-Type: application/json');
$timeframe = 10 * 60;

function roundTo5s($num){
Expand Down

0 comments on commit d7affc0

Please sign in to comment.