| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-01-22 | 3.3 kB | |
| v1.19.0 source code.tar.gz | 2026-01-22 | 41.6 kB | |
| v1.19.0 source code.zip | 2026-01-22 | 50.6 kB | |
| Totals: 3 Items | 95.5 kB | 4 | |
What's Changed
Main Changes
-
Add dynamic cookie options support Cookie options can now be dynamic, allowing for more flexible and context-aware configuration based on each request. This feature enables programmatic modification of cookie attributes like
secure,httpOnly,sameSite,maxAge,domain, andpathbased on session or request conditions.js var app = express() app.use(session({ secret: 'keyboard cat', resave: false, saveUninitialized: true, cookie: function (req) { var match = req.url.match(/^\/([^/]+)/); return { path: match ? '/' + match[1] : '/', httpOnly: true, secure: req.secure || false, maxAge: 60000 } } })) -
Add sameSite 'auto' support for automatic SameSite attribute configuration Added
sameSite: 'auto'option for cookie configuration that automatically setsSameSite=Nonefor HTTPS andSameSite=Laxfor HTTP connections, simplifying cookie handling across different environments. - deps: use tilde notation for dependencies
PRs
- chore: add funding to package.json by @bjohansebas in https://github.com/expressjs/session/pull/1071
- build(deps): bump actions/download-artifact from 4.3.0 to 6.0.0 by @dependabot[bot] in https://github.com/expressjs/session/pull/1086
- build(deps): bump github/codeql-action from 3.28.18 to 4.31.2 by @dependabot[bot] in https://github.com/expressjs/session/pull/1085
- build(deps): bump coverallsapp/github-action from 2.3.6 to 2.3.7 by @dependabot[bot] in https://github.com/expressjs/session/pull/1091
- build(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0 by @dependabot[bot] in https://github.com/expressjs/session/pull/1090
- build(deps): bump github/codeql-action from 4.31.2 to 4.31.6 by @dependabot[bot] in https://github.com/expressjs/session/pull/1089
- build(deps): bump actions/checkout from 4.2.2 to 6.0.0 by @dependabot[bot] in https://github.com/expressjs/session/pull/1088
- build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.3 by @dependabot[bot] in https://github.com/expressjs/session/pull/1082
- refactor: remove unused
sessparameter fromgenerateSessionIdfun… by @Ayoub-Mabrouk in https://github.com/expressjs/session/pull/1001 - chore: remove history.md from being packaged on publish by @bjohansebas in https://github.com/expressjs/session/pull/1097
- deps: use tilde notation for dependencies by @bjohansebas in https://github.com/expressjs/session/pull/1096
- Add sameSite 'auto' support to match secure 'auto' pattern by @djunehor in https://github.com/expressjs/session/pull/1087
- feat: add support to dynamic cookie options by @lincond in https://github.com/expressjs/session/pull/1027
- Release: 1.19.0 by @UlisesGascon in https://github.com/expressjs/session/pull/1107
New Contributors
- @Ayoub-Mabrouk made their first contribution in https://github.com/expressjs/session/pull/1001
- @djunehor made their first contribution in https://github.com/expressjs/session/pull/1087
- @lincond made their first contribution in https://github.com/expressjs/session/pull/1027
Full Changelog: https://github.com/expressjs/session/compare/v1.18.2...v1.19.0