Skip to content

Commit

Permalink
2024年6月06日 添加根域退出登录逻辑05
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Jun 6, 2024
1 parent eabc6a4 commit 38d464c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions mg/handlers/login_v5_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,10 @@ async def handle_verification(self):

class LogoutHandler(RequestHandler, ABC):

def get_root_domain(self):
import re
# 获取当前站点域名
domain = self.request.host
logging.error(f"get_root_domain {self.request.host}")
# 解析根域名
root_domain = re.search(r'\.([^.]+\.[^.]+)$', domain).group(1)
return root_domain

def get(self):
try:
self.clear_all_cookies()
root_domain = self.get_root_domain()
root_domain = self.request.headers.get('_codo_root_domain')
logging.error(root_domain)
self.clear_cookie("auth_key", domain=root_domain)
self.clear_cookie("is_login", domain=root_domain)
Expand Down

0 comments on commit 38d464c

Please sign in to comment.