mirror of https://github.com/jumpserver/jumpserver
[Update] 刷新session有效期
parent
4d1da1d292
commit
12b2f2f499
|
@ -56,4 +56,6 @@ class RequestMiddleware:
|
|||
def __call__(self, request):
|
||||
set_current_request(request)
|
||||
response = self.get_response(request)
|
||||
age = request.session.get_expiry_age()
|
||||
request.session.set_expiry(age)
|
||||
return response
|
||||
|
|
|
@ -25,7 +25,8 @@ class OrgMiddleware:
|
|||
def __call__(self, request):
|
||||
self.set_permed_org_if_need(request)
|
||||
org = get_org_from_request(request)
|
||||
request.current_org = org
|
||||
set_current_org(org)
|
||||
if org is not None:
|
||||
request.current_org = org
|
||||
set_current_org(org)
|
||||
response = self.get_response(request)
|
||||
return response
|
||||
|
|
Loading…
Reference in New Issue