Skip to content

Commit 1a2567e

Browse files
committed
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.
1 parent b23c9a3 commit 1a2567e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private function generateLogoutUrl($key, $referenceType)
101101
if ('/' === $logoutPath[0]) {
102102
$request = $this->container->get('request');
103103

104-
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath;
104+
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;
105105

106106
if (!empty($parameters)) {
107107
$url .= '?'.http_build_query($parameters);

0 commit comments

Comments
 (0)