Fix the logout path when not using the router

This needs to use the base url, not the base path, so that it goes
through the front controller when not using url rewriting.
This commit is contained in:
Christophe Coevoet 2015-12-17 13:54:40 +01:00
parent b23c9a3b5b
commit 1a2567e19e

View File

@ -101,7 +101,7 @@ class LogoutUrlHelper extends Helper
if ('/' === $logoutPath[0]) {
$request = $this->container->get('request');
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath;
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;
if (!empty($parameters)) {
$url .= '?'.http_build_query($parameters);