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)
365
-
saveUninitialized: false,// recommended: only save session when data exists
366
-
secret: sessionSecret,
367
-
cookie: {
368
-
secure: true,// ✅ Use HTTPS
369
-
httpOnly: true,// ✅ Only accessible by the server (not client-side JS)
370
-
sameSite: 'None'// ✅ Allows cross-origin (e.g., Keycloak on a different domain)
371
-
}
368
+
letredisStore=newRedisStore({
369
+
client: cacheClient,
370
+
prefix: "sessions:",
372
371
})
373
-
)
374
-
winston.info("Express Session with Redis enabled with Secret: "+sessionSecret);
375
372
373
+
app.use(
374
+
session({
375
+
store: redisStore,
376
+
resave: false,// required: force lightweight session keep alive (touch)
377
+
saveUninitialized: false,// recommended: only save session when data exists
378
+
secret: sessionSecret,
379
+
cookie: {
380
+
secure: true,// ✅ Use HTTPS
381
+
httpOnly: true,// ✅ Only accessible by the server (not client-side JS)
382
+
sameSite: 'None'// ✅ Allows cross-origin (e.g., Keycloak on a different domain)
383
+
}
384
+
})
385
+
)
386
+
winston.info("Express Session with Redis enabled with Secret: "+sessionSecret);
387
+
}else{
388
+
winston.warn("ENABLE_REDIS_SESSION is true but Redis cache is not available (pubmodules cache not initialized). Using default in-memory session store.");
389
+
app.use(session({secret: sessionSecret}));
390
+
winston.info("Express Session enabled with Secret: "+sessionSecret);
391
+
}
376
392
377
393
}else{
378
394
app.use(session({secret: sessionSecret}));
@@ -647,7 +663,10 @@ app.use('/:projectid/kb', [passport.authenticate(['basic', 'jwt'], { session: fa
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