diff --git a/apps/authentication/templates/authentication/login_wait_confirm.html b/apps/authentication/templates/authentication/login_wait_confirm.html index 33d05e03a..e854a8965 100644 --- a/apps/authentication/templates/authentication/login_wait_confirm.html +++ b/apps/authentication/templates/authentication/login_wait_confirm.html @@ -163,9 +163,9 @@ $(document).ready(function () { }).on('click', '.btn-return', function () { cancelTicket(); cancelCloseConfirm(); - setTimeout(() => { - window.location = "{% url 'authentication:login' %}" - }, 1000); + clearInterval(interval); + clearInterval(checkInterval); + window.location = "{% url 'authentication:logout' %}" }) diff --git a/apps/common/sessions/cache.py b/apps/common/sessions/cache.py index 43e064948..30c76e94b 100644 --- a/apps/common/sessions/cache.py +++ b/apps/common/sessions/cache.py @@ -7,8 +7,11 @@ from django.contrib.sessions.backends.cache import ( ) from django.core.cache import cache, caches +from common.utils import get_logger from jumpserver.utils import get_current_request +logger = get_logger(__file__) + class SessionStore(DjangoSessionStore): ignore_urls = [ @@ -23,7 +26,10 @@ class SessionStore(DjangoSessionStore): def save(self, *args, **kwargs): request = get_current_request() if request is None or not self.ignore_pattern.match(request.path): - super().save(*args, **kwargs) + try: + super().save(*args, **kwargs) + except Exception as e: + logger.info(f'SessionStore save error: {e}') class RedisUserSessionManager: