fix(routing): prevent login redirect loops on alias targets
This commit is contained in:
@@ -82,7 +82,9 @@ class AccessControl
|
||||
}
|
||||
|
||||
$locale = I18n::$locale ?? I18n::$defaultLocale;
|
||||
$loginPath = Request::withLocale('login', $locale);
|
||||
// Use the concrete target route. Minty alias rewrites compare the full
|
||||
// REQUEST_URI (including query), so alias paths with query params are fragile.
|
||||
$loginPath = Request::withLocale('auth/login', $locale);
|
||||
|
||||
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
$loginTarget = $this->intendedUrlService->buildLoginRedirect($loginPath, $requestUri);
|
||||
|
||||
Reference in New Issue
Block a user