Fix redirect loop: tambah guard lebih ketat di semua file, hapus redirect di .htaccess public
This commit is contained in:
@@ -236,7 +236,14 @@
|
||||
|
||||
// Check auth
|
||||
if (!Auth.isAuthenticated()) {
|
||||
window.location.href = '../index.php';
|
||||
const currentPath = window.location.pathname.toLowerCase();
|
||||
const isLoginPage = currentPath.includes('index.php') ||
|
||||
currentPath === '/' ||
|
||||
currentPath === '/index.php';
|
||||
// Hanya redirect jika belum di login page
|
||||
if (!isLoginPage) {
|
||||
window.location.href = '../index.php';
|
||||
}
|
||||
}
|
||||
|
||||
// Logout handler
|
||||
|
||||
Reference in New Issue
Block a user