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');