修复文集访问码认证后一直有效的问题
This commit is contained in:
parent
1db0691d8b
commit
32a8ac32bd
@ -162,9 +162,17 @@ def register(request):
|
||||
def log_out(request):
|
||||
try:
|
||||
logout(request)
|
||||
project_viewcode_list = []
|
||||
for c in list(request.COOKIES.keys()):
|
||||
if c.startswith('viewcode-'):
|
||||
project_viewcode_list.append(c)
|
||||
resp = redirect(request.META['HTTP_REFERER'])
|
||||
for c in project_viewcode_list:
|
||||
resp.delete_cookie(c)
|
||||
return resp
|
||||
except Exception as e:
|
||||
logger.exception("注销异常")
|
||||
return redirect(request.META['HTTP_REFERER'])
|
||||
return redirect(request.META['HTTP_REFERER'])
|
||||
|
||||
|
||||
# 忘记密码
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user