Files
web/php/add.php
diginc 657fb7badc Fixes and refactoring WL/BL files more
* CORS was required to auth (bug) - fixed
* Logging defaults to the default lighttpd error log
* Overridable error log location to support alpine/nginx container or power users
* Put the repeated code into a include for sub/add, auth.php
* Error logs say what failed much better now
* VIRTUAL_HOST should theoretically allow custom hostnames for CORS
2016-07-07 00:28:28 -05:00

14 lines
243 B
PHP

<?php
require('auth.php');
switch($_POST['list']) {
case "white":
echo exec("sudo pihole -w -q ${_POST['domain']}");
break;
case "black":
echo exec("sudo pihole -b -q ${_POST['domain']}");
break;
}
?>