mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
set the session cookie expiry *properly* on each request
see: https://github.com/ansible/tower/issues/2907
This commit is contained in:
parent
5abe045e6c
commit
a271837007
@ -128,8 +128,9 @@ class SessionTimeoutMiddleware(object):
|
||||
def process_response(self, request, response):
|
||||
req_session = getattr(request, 'session', None)
|
||||
if req_session and not req_session.is_empty():
|
||||
request.session.set_expiry(request.session.get_expiry_age())
|
||||
response['Session-Timeout'] = int(settings.SESSION_COOKIE_AGE)
|
||||
expiry = int(settings.SESSION_COOKIE_AGE)
|
||||
request.session.set_expiry(expiry)
|
||||
response['Session-Timeout'] = expiry
|
||||
return response
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user