Forbid non-CLI access to command-line scripts
[friendica.git/.git] / bin / worker.php
index 1b70a20..833e5b0 100755 (executable)
  * Starts the background processing
  */
 
+if (php_sapi_name() !== 'cli') {
+       header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
+       exit();
+}
+
 use Dice\Dice;
 use Friendica\App;
 use Friendica\Core\Update;