diff --git a/php/add.php b/php/add.php index 9ebea424..775f3d6c 100644 --- a/php/add.php +++ b/php/add.php @@ -24,7 +24,7 @@ if(in_array($_SERVER['HTTP_ORIGIN'], $SERVER_SIDE_IDS)) { } else if(in_array($_SERVER['HTTP_HOST'], $SERVER_SIDE_IDS)) { $CORS_ALLOW_ORIGIN = $_SERVER['HTTP_HOST']; } - + if (!$CORS_ALLOW_ORIGIN) die_and_log("Failed CORS"); @@ -38,7 +38,7 @@ if(!hash_equals($_SESSION['token'], $_POST['token'])) switch($_POST['list']) { - case "white": + case "white": echo exec("sudo pihole -w -q ${_POST['domain']}"); break; case "black": diff --git a/php/sub.php b/php/sub.php index df12dedd..9931bbe6 100644 --- a/php/sub.php +++ b/php/sub.php @@ -24,7 +24,7 @@ if(in_array($_SERVER['HTTP_ORIGIN'], $SERVER_SIDE_IDS)) { } else if(in_array($_SERVER['HTTP_HOST'], $SERVER_SIDE_IDS)) { $CORS_ALLOW_ORIGIN = $_SERVER['HTTP_HOST']; } - + if (!$CORS_ALLOW_ORIGIN) die_and_log("Failed CORS"); @@ -38,7 +38,7 @@ if(!hash_equals($_SESSION['token'], $_POST['token'])) switch($_POST['list']) { - case "white": + case "white": exec("sudo pihole -w -q ${_POST['domain']}"); break; case "black":