protected session is now global application state to avoid weird issues with multiple tabs/windows/reloads

This commit is contained in:
zadam
2021-05-07 22:23:49 +02:00
parent fddab59265
commit de6108f95d
11 changed files with 49 additions and 82 deletions

View File

@@ -93,7 +93,6 @@ function route(method, path, middleware, routeHandler, resultHandler, transactio
cls.set('sourceId', req.headers['trilium-source-id']);
cls.set('localNowDateTime', req.headers['trilium-local-now-datetime']);
cls.set('hoistedNoteId', req.headers['trilium-hoisted-note-id'] || 'root');
protectedSessionService.setProtectedSessionId(req);
const cb = () => routeHandler(req, res, next);