From a6615dea841cf2eecd3130cbf512b894dbb8fa41 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Thu, 27 Oct 2022 16:17:10 +0300 Subject: [PATCH] [bug] Fix connection without jwt --- DocService/sources/DocsCoServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DocService/sources/DocsCoServer.js b/DocService/sources/DocsCoServer.js index a535ba40..9e5a8a24 100644 --- a/DocService/sources/DocsCoServer.js +++ b/DocService/sources/DocsCoServer.js @@ -1327,7 +1327,7 @@ exports.install = function(server, callbackFunction) { ctx.logger.info('io.use error: %s', err.stack); } finally { ctx.logger.info('io.use end'); - next(checkJwtRes.decoded ? undefined : new Error("not authorized")); + next((checkJwtRes && !checkJwtRes.decoded) ? new Error("not authorized") : undefined); } }); });