Merge branch 'downstream' into devel

This commit is contained in:
Ryan Petrello
2019-05-10 09:18:07 -04:00
5 changed files with 24 additions and 8 deletions

View File

@@ -126,6 +126,9 @@ class SessionTimeoutMiddleware(object):
def process_response(self, request, response):
should_skip = 'HTTP_X_WS_SESSION_QUIET' in request.META
# Something went wrong, such as upgrade-in-progress page
if not hasattr(request, 'session'):
return response
# Only update the session if it hasn't been flushed by being forced to log out.
if request.session and not request.session.is_empty() and not should_skip:
expiry = int(settings.SESSION_COOKIE_AGE)