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 1919@admin_api .post ('/login' )
2020async def login (data : LoginData ):
2121 # 验证管理员密码
22- if data .password != settings .admin_password :
22+ if data .password != settings .admin_token :
2323 raise HTTPException (status_code = 401 , detail = "密码错误" )
2424
2525 # 生成包含管理员身份的token
Original file line number Diff line number Diff line change 3636 'onedrive_root_path' : 'filebox_storage' ,
3737 'onedrive_proxy' : 0 ,
3838 'webdav_hostname' : '' ,
39- 'webdav_username' : '' ,
40- 'webdav_password' : '' ,
4139 'webdav_root_path' : 'filebox_storage' ,
4240 'webdav_proxy' : 0 ,
4341 'admin_token' : 'FileCodeBox2023' ,
7169 'port' : 12345 ,
7270 'showAdminAddr' : 0 ,
7371 'robotsText' : 'User-agent: *\n Disallow: /' ,
74- 'jwt_secret_key' : "your-secret-key" , # 建议使用环境变量
75- 'jwt_algorithm' : "HS256" ,
76- 'admin_password' : 'FileCodeBox2023' , # 建议使用环境变量存储
7772}
7873
7974
You can’t perform that action at this time.
0 commit comments