From 9ea08462ca1e8be6de9474f23c1316b28d608a50 Mon Sep 17 00:00:00 2001 From: 1sonhador <1sonhador@gmail.com> Date: Wed, 15 Oct 2025 01:15:07 +0100 Subject: [PATCH] Protect /dashboard route - redirect to login if not authenticated --- crm/Routes/web.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crm/Routes/web.php b/crm/Routes/web.php index a642dc1..53439ad 100644 --- a/crm/Routes/web.php +++ b/crm/Routes/web.php @@ -66,6 +66,17 @@ $router->get('/', function() { exit(); }); +// --- DASHBOARD ROUTE --- +// Protect /dashboard route - require authentication +$router->get('/dashboard', function() { + if (!\App\Core\Auth::check()) { + header('Location: /login'); + exit(); + } + header('Location: /redirects'); + exit(); +}); + // --- SCANNER REDIRECTS --- // Legacy redirects for scanner compatibility