mirror of
https://github.com/flarum/core.git
synced 2025-01-17 14:18:33 +01:00
Canonical URL: use UrlGenerator in place of extracting the url from request (#2674)
This commit is contained in:
parent
6e4c75eba6
commit
0e6a60bd5b
@ -89,7 +89,7 @@ class Index
|
||||
$document->title = $this->translator->trans('core.forum.index.meta_title_text');
|
||||
$document->content = $this->view->make('flarum.forum::frontend.content.index', compact('apiDocument', 'page'));
|
||||
$document->payload['apiDocument'] = $apiDocument;
|
||||
$document->canonicalUrl = $defaultRoute === '/all' ? $this->url->to('forum')->base() : $request->getUri()->withQuery('');
|
||||
$document->canonicalUrl = $this->url->to('forum')->base().($defaultRoute === '/all' ? '' : $request->getUri()->getPath());
|
||||
|
||||
return $document;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user