mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
chore:
This commit is contained in:
@@ -88,8 +88,7 @@ export class AuthorityMiddleware implements IWebMiddleware {
|
||||
|
||||
async doOpenHandler(ctx: IMidwayKoaContext, next: Next) {
|
||||
//开放接口
|
||||
let openKey = ctx.get('Authorization') || '';
|
||||
openKey = openKey.replace('Bearer ', '').trim();
|
||||
const openKey = ctx.get('x-api-token') || '';
|
||||
if (!openKey) {
|
||||
ctx.status = 401;
|
||||
ctx.body = Constants.res.auth;
|
||||
|
||||
Reference in New Issue
Block a user