LibreChat/api/server
Lars Kiesow dd927583a7
Provide production-ready memory store for eypress-session (#5212)
The `express-session` library comes with a session storage meant for
testing by default. That is why you get a message like this when you
start up LibreChat with OIDC enabled:

    Warning: connect.session() MemoryStore is not
    designed for a production environment, as it will leak
    memory, and will not scale past a single process.

LibreChat can already use Redis as a session storage, although Redis support
is still marked as experimental. It also makes the set-up more complex, since
you will need to configure and run yet another service.

This pull request provides a simple alternative by using a in-memory session
store marked as a production-ready alternative by the guys from
`express-session`¹. You can still configure Redis, but this provides a simple,
good default for everyone else.

See also https://github.com/danny-avila/LibreChat/discussions/1014

¹⁾ https://github.com/expressjs/session?tab=readme-ov-file#compatible-session-stores
2025-01-09 11:23:51 -05:00
..
controllers 🐛 fix: Correct Endpoint/Icon Handling, Update Module Resolutions (#5205) 2025-01-07 11:09:18 -05:00
middleware 🐛 fix: Enforced Model Spec Icons/Labels and Agent Descriptions (#4979) 2024-12-13 16:15:48 -05:00
routes 🔄 refactor: Consolidate Tokenizer; Fix Jest Open Handles (#5175) 2025-01-03 18:11:14 -05:00
services 🐛 fix: Ensure Default ModelSpecs Are Set Correctly (#5218) 2025-01-08 21:57:00 -05:00
utils 🐛 fix: Artifacts Type Error, Tool Token Counts, and Agent Chat Import (#5142) 2024-12-30 13:01:47 -05:00
index.js 🔄 feat: Add Configurable Cache Headers for Index.html (#4565) 2024-10-28 11:01:31 -04:00
socialLogins.js Provide production-ready memory store for eypress-session (#5212) 2025-01-09 11:23:51 -05:00