perf: Login confirm return failed (#13560)

Co-authored-by: feng <1304903146@qq.com>
pull/13568/head
fit2bot 2024-07-02 11:02:30 +08:00 committed by GitHub
parent 4733d89807
commit 5594b25ae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -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' %}"
})
</script>

View File

@ -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: