Protect /dashboard route - redirect to login if not authenticated
This commit is contained in:
1 parent
d7d6ba9391
commit
9ea08462ca
1 file changed
+11
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user