Session guard refresh 1s

This commit is contained in:
2026-09-12 09:59:36 +02:00
parent fc1a211c73
commit 987bcf5684
4 changed files with 101 additions and 50 deletions
+3
View File
@@ -64,9 +64,12 @@ $currentUserTheme = !empty($currentUser['id']) ? get_user_theme((int)$currentUse
<script>
(function() {
try {
let hasRedirected = false;
const sessionExpiresAt = <?= strtotime('today 23:59:59') ?> * 1000;
const checkExpiry = function() {
if (hasRedirected) return;
if (Date.now() > sessionExpiresAt + 1000) {
hasRedirected = true;
window.location.href = '/auth/login.php?expired=1';
}
};