Protect /dashboard route - redirect to login if not authenticated

This commit is contained in:
1sonhador committed 2025-10-15 01:15:07 +01:00
1 parent d7d6ba9391
commit 9ea08462ca
1 file changed
+11
+11
View File
@@ -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