From 99d881fc0d94677b3b1ee549094eaf967b687ed4 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 18 Jun 2022 19:24:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9Ftoken?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/loaders/express.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/loaders/express.ts b/back/loaders/express.ts index 3402799d..86ddcc1f 100644 --- a/back/loaders/express.ts +++ b/back/loaders/express.ts @@ -62,7 +62,7 @@ export default ({ app }: { app: Application }) => { const keyMatch = req.path.match(/\/open\/([a-z]+)\/*/); const key = keyMatch && keyMatch[1]; if ( - doc.scopes.includes(key as any) && + (doc.scopes.includes(key as any) || doc.name === 'system') && currentToken && currentToken.expiration >= Math.round(Date.now() / 1000) ) {