bug #17048 Fix the logout path when not using the router (stof)
This PR was merged into the 2.3 branch.
Discussion
----------
Fix the logout path when not using the router
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17029
| License | MIT
| Doc PR | n/a
This needs to use the base url, not the base path, so that it goes through the front controller when not using url rewriting.
Commits
-------
1a2567e
Fix the logout path when not using the router
This commit is contained in:
commit
c2b7ccb36c
@ -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);
|
||||
|
Reference in New Issue
Block a user