Skip to content

Commit

Permalink
Fix the logout path when not using the router
Browse files Browse the repository at this point in the history
This needs to use the base url, not the base path, so that it goes
through the front controller when not using url rewriting.
  • Loading branch information
stof committed Dec 17, 2015
1 parent b23c9a3 commit 1a2567e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -101,7 +101,7 @@ private function generateLogoutUrl($key, $referenceType)
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);
Expand Down

0 comments on commit 1a2567e

Please sign in to comment.