Skip to content

Commit f265f48

Browse files
committed
fix: reauth when no referer now doesn't throw exception
1 parent 4583fa5 commit f265f48

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Controller/ReauthenticateController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ public function reauthenticate(
3030
ServiceLocator $managersLocator,
3131
): Response {
3232
$response = $request->headers->get('referer') === $request->getRequestUri()
33-
? $this->redirectToRoute(Routes::WORDPRESS)
34-
: $this->redirect($request->headers->get('referer'));
33+
? $this->redirectToRoute(Routes::WORDPRESS, [
34+
'path' => ''
35+
])
36+
: $this->redirect($request->headers->get('referer') ?: $this->generateUrl(Routes::WORDPRESS, [
37+
'path' => ''
38+
]));
3539

3640
$wordpressLoader->loadWordpress();
3741

0 commit comments

Comments
 (0)