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 14:04:43 +01:00
parent 2d48af7745
commit 542b877424

View File

@ -121,7 +121,7 @@ class LogoutUrlGenerator
$request = $this->requestStack->getCurrentRequest();
$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);