fix loading of protected session in electron, #469

This commit is contained in:
zadam
2019-03-30 18:00:08 +01:00
parent c2e3a3fe04
commit b51ac112a2
4 changed files with 2386 additions and 2370 deletions

View File

@@ -15,7 +15,8 @@ function setDataKey(decryptedDataKey) {
}
function setProtectedSessionId(req) {
cls.namespace.set('protectedSessionId', req.cookies.protectedSessionId);
// cookies is the main storage but for electron header is used when bypassing HTTP
cls.namespace.set('protectedSessionId', req.headers['trilium-protected-session-id'] || req.cookies.protectedSessionId);
}
function getProtectedSessionId() {