From 6c62d4c412e00f8c8a8b362983f6dc204a9ca8be Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 14 Dec 2021 09:27:49 +0000 Subject: [PATCH] Merge pull request #6100 from overleaf/bg-fix-bot-exception [web] fix exception when trying to regenerate bot session GitOrigin-RevId: 753b1dc5cc54263d198181d53bd8dfa02b7dae05 --- .../web/app/src/infrastructure/SessionAutostartMiddleware.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/web/app/src/infrastructure/SessionAutostartMiddleware.js b/services/web/app/src/infrastructure/SessionAutostartMiddleware.js index ca883db483..89c4094276 100644 --- a/services/web/app/src/infrastructure/SessionAutostartMiddleware.js +++ b/services/web/app/src/infrastructure/SessionAutostartMiddleware.js @@ -88,6 +88,9 @@ class SessionAutostartMiddleware { noSessionCallback: (_req, _res, next) => { next() }, + // prevent exception for bot accesses to /project (which requires + // login and regenerates session) + regenerate: cb => cb(), } } }