From 4bc1deda42ec3d7aac184258e43fb3b7d594dde2 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Thu, 1 Jul 2021 11:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dreq=E5=8F=82=E6=95=B0?= 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 bd47572c..4cdd7f12 100644 --- a/back/loaders/express.ts +++ b/back/loaders/express.ts @@ -27,7 +27,7 @@ export default ({ app }: { app: Application }) => { return next(); } } - if (!headerToken && req.url && req.path === '/api/login') { + if (!headerToken && req.path && req.path === '/api/login') { return next(); } const err: any = new Error('UnauthorizedError');