add redirect after log in to support deep links

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-02-09 09:41:20 +11:00
parent d434cc5315
commit 75c7d6c015
3 changed files with 37 additions and 11 deletions

View File

@@ -86,7 +86,8 @@ if ($nax_WebProtection == 'true') {
// Logged in or stay on this page if we are on the index.php already
} else {
// We need to redirect
redirect('/index.php');
$returnUrl = base64_encode($_SERVER['REQUEST_URI']);
redirect("/index.php?next=" . $returnUrl);
exit; // exit is needed to prevent authentication bypass
}
}