File tree Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Expand file tree Collapse file tree 2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change 19
19
@admin_api .post ('/login' )
20
20
async def login (data : LoginData ):
21
21
# 验证管理员密码
22
- if data .password != settings .admin_password :
22
+ if data .password != settings .admin_token :
23
23
raise HTTPException (status_code = 401 , detail = "密码错误" )
24
24
25
25
# 生成包含管理员身份的token
Original file line number Diff line number Diff line change 36
36
'onedrive_root_path' : 'filebox_storage' ,
37
37
'onedrive_proxy' : 0 ,
38
38
'webdav_hostname' : '' ,
39
- 'webdav_username' : '' ,
40
- 'webdav_password' : '' ,
41
39
'webdav_root_path' : 'filebox_storage' ,
42
40
'webdav_proxy' : 0 ,
43
41
'admin_token' : 'FileCodeBox2023' ,
71
69
'port' : 12345 ,
72
70
'showAdminAddr' : 0 ,
73
71
'robotsText' : 'User-agent: *\n Disallow: /' ,
74
- 'jwt_secret_key' : "your-secret-key" , # 建议使用环境变量
75
- 'jwt_algorithm' : "HS256" ,
76
- 'admin_password' : 'FileCodeBox2023' , # 建议使用环境变量存储
77
72
}
78
73
79
74
You can’t perform that action at this time.
0 commit comments