diff --git a/index.php b/index.php index e5a6275a70b..a05281443e8 100644 --- a/index.php +++ b/index.php @@ -130,7 +130,7 @@ $handler = static function () { } }; -if (function_exists('frankenphp_handle_request')) { +if (function_exists('frankenphp_handle_request') && isset($_SERVER['FRANKENPHP_WORKER']) && $_SERVER['FRANKENPHP_WORKER'] === '1') { $maxRequests = (int)($_SERVER['MAX_REQUESTS'] ?? 0); for ($nbRequests = 0; !$maxRequests || $nbRequests < $maxRequests; ++$nbRequests) { $keepRunning = \frankenphp_handle_request($handler);