1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 08:41:17 +02:00

Use path info for routing

This commit is contained in:
Franz Liedke
2015-08-26 23:39:39 +02:00
parent e4ceb84aaf
commit 342f797d80

View File

@@ -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);