summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Coevoet <stof@notk.org>2015-12-17 14:04:43 +0100
committerChristophe Coevoet <stof@notk.org>2015-12-17 14:04:43 +0100
commit9685b588a8a11822620871472fe46ff7a9fe483c (patch)
treeff730b00fd65cfc00c3147465d0a505219df96ba
parent609da32820adbe22c5c9eb6b769e0e5ccf40eaa0 (diff)
downloadsymfony-security-9685b588a8a11822620871472fe46ff7a9fe483c.zip
symfony-security-9685b588a8a11822620871472fe46ff7a9fe483c.tar.gz
symfony-security-9685b588a8a11822620871472fe46ff7a9fe483c.tar.bz2
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.
-rw-r--r--Http/Logout/LogoutUrlGenerator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Http/Logout/LogoutUrlGenerator.php b/Http/Logout/LogoutUrlGenerator.php
index 298c224..4ad63cc 100644
--- a/Http/Logout/LogoutUrlGenerator.php
+++ b/Http/Logout/LogoutUrlGenerator.php
@@ -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);