diff --git a/cron/status.cron.php b/cron/status.cron.php index 0905d8da..9e533a1a 100644 --- a/cron/status.cron.php +++ b/cron/status.cron.php @@ -29,7 +29,12 @@ require_once __DIR__ . '/../src/bootstrap.php'; if(!psm_is_cli()) { - die('This script can only be run from the command line.'); + // check if it's an allowed host + $allow = PSM_CRON_ALLOW; + if(!in_array($_SERVER['REMOTE_ADDR'], $allow) && !in_array($_SERVER["HTTP_X_FORWARDED_FOR"], $allow)) { + header('HTTP/1.0 404 Not Found'); + die('404 Not Found

Not Found

The requested URL /cron/status.cron.php was not found on this server.

'); + } } $cron_timeout = PSM_CRON_TIMEOUT;