You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am able to successfully use this code in 3.8.1:
$app->get('/', function (Request $request, Response $response) {
if (UserState::isLoggedIn()) {
return $response->withHeader('Location', '/dashboard');
}
return $response->withHeader('Location', '/login');
})->setName('home');
However in 3.9 a white screen appears with no output (I do have displayErrorDetails set to true). There are no errors in my PHP error log and no errors in Apache, either.
The only way I can get a redirect to work is to replace the return lines above with: header("Location: /dashboard"); exit; but I much prefer to use the tools provided by the framework.
Thank you for reading!
Apologies if this has already been raised; I did not see it in the issue list.
The text was updated successfully, but these errors were encountered:
Hello, I am able to successfully use this code in 3.8.1:
However in 3.9 a white screen appears with no output (I do have displayErrorDetails set to true). There are no errors in my PHP error log and no errors in Apache, either.
The only way I can get a redirect to work is to replace the return lines above with:
header("Location: /dashboard"); exit;
but I much prefer to use the tools provided by the framework.Thank you for reading!
Apologies if this has already been raised; I did not see it in the issue list.
The text was updated successfully, but these errors were encountered: