Skip to content

Commit 6ab65fe

Browse files
committed
1.19.0
1 parent 2673736 commit 6ab65fe

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

HISTORY.md

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,9 @@
1-
# Unreleased changes
2-
3-
### 🚀 Improvements
4-
5-
* Add dynamic cookie options support
6-
7-
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`, and `path` based on session or request conditions.
8-
9-
```js
10-
var app = express()
11-
app.use(session({
12-
secret: 'keyboard cat',
13-
resave: false,
14-
saveUninitialized: true,
15-
cookie: function (req) {
16-
var match = req.url.match(/^\/([^/]+)/);
17-
return {
18-
path: match ? '/' + match[1] : '/',
19-
httpOnly: true,
20-
secure: req.secure || false,
21-
maxAge: 60000
22-
}
23-
}
24-
}))
25-
```
26-
* Add sameSite 'auto' support for automatic SameSite attribute configuration
27-
28-
Added `sameSite: 'auto'` option for cookie configuration that automatically sets `SameSite=None` for HTTPS and `SameSite=Lax` for HTTP connections, simplifying cookie handling across different environments.
29-
30-
* deps: use tilde notation for dependencies
1+
1.19.0 / 2026-01-22
2+
==========
3+
4+
* Add dynamic cookie options support
5+
* Add sameSite 'auto' support for automatic SameSite attribute configuration
6+
* deps: use tilde notation for dependencies
317

328
1.18.2 / 2025-07-17
339
==========

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-session",
3-
"version": "1.18.2",
3+
"version": "1.19.0",
44
"description": "Simple session middleware for Express",
55
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
66
"contributors": [

0 commit comments

Comments
 (0)