mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
feat(session_parser): use cookiePath from config
This commit is contained in:
parent
3c8723a404
commit
a600568ab8
@ -2,6 +2,7 @@ import session from "express-session";
|
||||
import sessionFileStore from "session-file-store";
|
||||
import sessionSecret from "../services/session_secret.js";
|
||||
import dataDir from "../services/data_dir.js";
|
||||
import config from "../services/config.js";
|
||||
const FileStore = sessionFileStore(session);
|
||||
|
||||
const sessionParser = session({
|
||||
@ -9,7 +10,7 @@ const sessionParser = session({
|
||||
resave: false, // true forces the session to be saved back to the session store, even if the session was never modified during the request.
|
||||
saveUninitialized: false, // true forces a session that is "uninitialized" to be saved to the store. A session is uninitialized when it is new but not modified.
|
||||
cookie: {
|
||||
// path: "/",
|
||||
path: config.Cookies.cookiePath,
|
||||
httpOnly: true,
|
||||
maxAge: 24 * 60 * 60 * 1000 // in milliseconds
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user