移除内置token判断

This commit is contained in:
whyour 2022-07-11 21:21:35 +08:00
parent b2afa65cb1
commit f2535ece76

View File

@ -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)
) {