You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
winston.info("Mongoose connection done on host: "+mongoose.connection.host+" on port: "+mongoose.connection.port+" with name: "+mongoose.connection.name)// , mongoose.connection.db);
resave: false,// required: force lightweight session keep alive (touch)
367
-
saveUninitialized: false,// recommended: only save session when data exists
368
-
secret: sessionSecret,
369
-
cookie: {
370
-
secure: true,// ✅ Use HTTPS
371
-
httpOnly: true,// ✅ Only accessible by the server (not client-side JS)
372
-
sameSite: 'None'// ✅ Allows cross-origin (e.g., Keycloak on a different domain)
373
-
}
370
+
letredisStore=newRedisStore({
371
+
client: cacheClient,
372
+
prefix: "sessions:",
374
373
})
375
-
)
376
-
winston.info("Express Session with Redis enabled with Secret: "+sessionSecret);
377
374
375
+
app.use(
376
+
session({
377
+
store: redisStore,
378
+
resave: false,// required: force lightweight session keep alive (touch)
379
+
saveUninitialized: false,// recommended: only save session when data exists
380
+
secret: sessionSecret,
381
+
cookie: {
382
+
secure: true,// ✅ Use HTTPS
383
+
httpOnly: true,// ✅ Only accessible by the server (not client-side JS)
384
+
sameSite: 'None'// ✅ Allows cross-origin (e.g., Keycloak on a different domain)
385
+
}
386
+
})
387
+
)
388
+
winston.info("Express Session with Redis enabled with Secret: "+sessionSecret);
389
+
}else{
390
+
winston.warn("ENABLE_REDIS_SESSION is true but Redis cache is not available (pubmodules cache not initialized). Using default in-memory session store.");
391
+
app.use(session({secret: sessionSecret}));
392
+
winston.info("Express Session enabled with Secret: "+sessionSecret);
console.log('[WELCOME_MSG_FLOW] chat21Handler: channelOutbound is CHAT21, creating group');
535
+
}else{
536
+
console.log('[WELCOME_MSG_FLOW] chat21Handler: channelOutbound is NOT CHAT21, skipping group creation',{channelOutbound: request.channelOutbound,channelOutboundName: request.channelOutbound?.name,expected: ChannelConstants.CHAT21});
0 commit comments