diff --git a/crm/Routes/web.php b/crm/Routes/web.php index 588644d..a642dc1 100644 --- a/crm/Routes/web.php +++ b/crm/Routes/web.php @@ -55,7 +55,16 @@ foreach ($moduleFolders as $moduleName) { $router = Router::getInstance(); - +// --- HOME ROUTE --- +// Redirect to login if not authenticated, otherwise to redirects dashboard +$router->get('/', function() { + if (!\App\Core\Auth::check()) { + header('Location: /login'); + exit(); + } + header('Location: /redirects'); + exit(); +}); // --- SCANNER REDIRECTS --- // Legacy redirects for scanner compatibility