1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-24 21:34:41 +03:00

redirect to logout

This commit is contained in:
Adolfo Gómez García 2022-04-25 14:28:18 +02:00
parent 8bac68b55b
commit 4f5cc505d3

View File

@ -91,12 +91,11 @@ class GlobalRequestMiddleware:
expiry = request.session.get(EXPIRY_KEY, now)
if expiry < now:
try:
webLogout(
return webLogout(
request=request
) # Ignore the response, just processes usere session logout
except Exception:
pass
return HttpResponse(content='Session Expired', status=403)
return HttpResponse(content='Session Expired', status=403)
# Update session timeout..self.
request.session[EXPIRY_KEY] = now + datetime.timedelta(
seconds=GlobalConfig.SESSION_DURATION_ADMIN.getInt()