mirror of
https://github.com/flarum/framework.git
synced 2025-01-07 19:13:37 +08:00
Use path info for routing
This commit is contained in:
parent
e4ceb84aaf
commit
342f797d80
|
@ -49,8 +49,9 @@ class RouterMiddleware
|
||||||
*/
|
*/
|
||||||
public function __invoke(Request $request, Response $response, callable $out = null)
|
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();
|
$method = $request->getMethod();
|
||||||
$uri = $request->getUri()->getPath() ?: '/';
|
|
||||||
|
|
||||||
$routeInfo = $this->getDispatcher()->dispatch($method, $uri);
|
$routeInfo = $this->getDispatcher()->dispatch($method, $uri);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user