diff --git a/src/Http/RouterMiddleware.php b/src/Http/RouterMiddleware.php index 1bb27c8dc..92506209b 100644 --- a/src/Http/RouterMiddleware.php +++ b/src/Http/RouterMiddleware.php @@ -49,8 +49,9 @@ class RouterMiddleware */ public function __invoke(Request $request, Response $response, callable $out = null) { + $serverParams = $request->getServerParams(); + $uri = array_get($serverParams, 'PATH_INFO', $request->getUri()->getPath()) ?: '/'; $method = $request->getMethod(); - $uri = $request->getUri()->getPath() ?: '/'; $routeInfo = $this->getDispatcher()->dispatch($method, $uri);