- Added CLI support
This commit is contained in:
1 parent
3320dc47c1
commit
163df3f4ba
1 file changed
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user