修复req参数

This commit is contained in:
hanhh committed 2021-07-01 11:49:44 +08:00
1 parent f9c1dfc8cb
commit 4bc1deda42
1 file changed
+1 -1
+1 -1
View File
@@ -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');