Cleaner way to get the domain

This commit is contained in:
Pierre Rudloff 2020-10-22 21:40:20 +02:00
parent e1d7ad44e0
commit d83774ae7d

View file

@ -83,7 +83,7 @@ class ViewFactory
$view->offsetSet('canonical', self::getCanonicalUrl($request));
$view->offsetSet('locale', $container->get('locale')->getLocale());
$view->offsetSet('config', $container->get('config'));
$view->offsetSet('domain', rtrim($uri->withPath('')->withBasePath(''), '/'));
$view->offsetSet('domain', $uri->withBasePath('')->getBaseUrl());
return $view;
}