feat: 站点个性化设置

This commit is contained in:
xiaojunnuo
2024-10-05 01:46:25 +08:00
parent ce9a9862f1
commit 11a9fe9014
57 changed files with 710 additions and 763 deletions
@@ -50,11 +50,11 @@ export class AuthorityMiddleware implements IWebMiddleware {
let token = ctx.get('Authorization') || '';
token = token.replace('Bearer ', '').trim();
if (token === '') {
if (!token) {
//尝试从cookie中获取token
token = ctx.cookies.get('token') || '';
}
if (token === '') {
if (!token) {
//尝试从query中获取token
token = (ctx.query.token as string) || '';
}