Skip to content

Commit

Permalink
remove scheme and host from _target_path (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-schnieper authored Jun 28, 2022
1 parent ec19587 commit b3fa528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MembersBundle/EventListener/ForbiddenRouteListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function onKernelRequest(RequestEvent $event): void
$restrictionRoute = $this->getRouteForRestriction($restriction);

if ($restrictionRoute !== false) {
$parameters = $restrictionRoute === 'members_user_security_login' ? ['_target_path' => $event->getRequest()->getUri()] : [];
$parameters = $restrictionRoute === 'members_user_security_login' ? ['_target_path' => $event->getRequest()->getPathInfo()] : [];
$response = new RedirectResponse($this->router->generate($restrictionRoute, $parameters));
$event->setResponse($response);
}
Expand Down

0 comments on commit b3fa528

Please sign in to comment.