diff --git a/src/ApplicationStrategy.php b/src/ApplicationStrategy.php index 6b70f5a..0cd517a 100644 --- a/src/ApplicationStrategy.php +++ b/src/ApplicationStrategy.php @@ -38,7 +38,11 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy { public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { - return $this->throw404($request); + if (php_sapi_name() !== 'cli' and ! defined('STDIN')) { + return $this->throw404($request); + } + + return $handler->handle($request);; } public function throw404(ServerRequestInterface $request) : ResponseInterface