mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 12:52:26 +00:00
fix(auth): 在请求上下文中添加会话ID设置
feat(gencode): 改进导入验证错误信息格式 fix(scheduler): 修复任务重复添加问题并合并错过的任务 refactor(router): 优化路由转换逻辑避免Layout嵌套 feat(middleware): 增强会话ID提取功能并改进日志记录
This commit is contained in:
@@ -131,7 +131,7 @@ class LoginService:
|
||||
login_location = await IpLocalUtil.get_ip_location(request_ip)
|
||||
request.scope["login_location"] = login_location
|
||||
|
||||
# 确保在请求上下文中设置用户名
|
||||
# 确保在请求上下文中设置用户名和会话ID
|
||||
request.scope["user_username"] = user.username
|
||||
|
||||
access_expires = timedelta(minutes=settings.ACCESS_TOKEN_EXPIRE_MINUTES)
|
||||
|
||||
Reference in New Issue
Block a user