Session guard refresh 1s
This commit is contained in:
@@ -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';
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user