From f2535ece76ac1be6bbdb3c3b08e265569b99ec3e Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 11 Jul 2022 21:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=86=85=E7=BD=AEtoken?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= 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 86ddcc1f..3402799d 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.name === 'system') && + doc.scopes.includes(key as any) && currentToken && currentToken.expiration >= Math.round(Date.now() / 1000) ) {