This commit is contained in:
2023-04-19 21:53:21 +08:00
parent 0f9f4d7f3d
commit df75b5dd66
+2 -1
View File
@@ -88,7 +88,8 @@ class Server implements OnRequestInterface
/** @var ConstrictRequest $PsrRequest */ /** @var ConstrictRequest $PsrRequest */
$PsrRequest = $this->initRequestAndResponse($request); $PsrRequest = $this->initRequestAndResponse($request);
$dispatcher = $this->router->query($request->server['request_uri'], $request->getMethod()); $request_uri = $request->getMethod() == 'OPTIONS' ? '/*' : $request->server['request_uri'];
$dispatcher = $this->router->query($request_uri, $request->getMethod());
$middleware = $this->request->middlewares; $middleware = $this->request->middlewares;
if (!($dispatcher instanceof Kiri\Router\Base\NotFoundController)) { if (!($dispatcher instanceof Kiri\Router\Base\NotFoundController)) {