Fix bookmarklet behind a reverse proxy

This commit is contained in:
Pierre Rudloff 2020-10-22 00:45:41 +02:00
parent 6bb577bcce
commit 7dead957f0
2 changed files with 1 additions and 2 deletions

View file

@ -54,7 +54,6 @@ class FrontController extends BaseController
*/
public function index(Request $request, Response $response)
{
$uri = $request->getUri()->withUserInfo('');
$this->view->render(
$response,
'index.tpl',
@ -63,7 +62,6 @@ class FrontController extends BaseController
'description' => $this->localeManager->t(
'Easily download videos from Youtube, Dailymotion, Vimeo and other websites.'
),
'domain' => $uri->getScheme() . '://' . $uri->getAuthority(),
'supportedLocales' => $this->localeManager->getSupportedLocales(),
]
);

View file

@ -83,6 +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', $uri->withPath('')->withBasePath(''));
return $view;
}