diff --git a/app/Config/Auth.php b/app/Config/Auth.php index 2d49eae..c3f8242 100644 --- a/app/Config/Auth.php +++ b/app/Config/Auth.php @@ -443,12 +443,16 @@ class Auth extends ShieldAuth $session = session(); $beforeLoginUrl = (string) ($session->getTempdata('beforeLoginUrl') ?? ''); - // Some AJAX workspace URLs can be stored as beforeLoginUrl in production + // Some temporary/internal URLs can be stored as beforeLoginUrl in production // and then hijack post-login landing. Skip those and use configured default. if ($beforeLoginUrl !== '') { $path = (string) parse_url($beforeLoginUrl, PHP_URL_PATH); $path = '/' . ltrim($path, '/'); - if ($path === '/doctor_work/document_workspace') { + $blockedPaths = [ + '/doctor_work/document_workspace', + '/opd/appointment', + ]; + if (in_array(strtolower($path), $blockedPaths, true)) { $beforeLoginUrl = ''; $session->removeTempdata('beforeLoginUrl'); }