Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/client-sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ Session.prototype = {
// support for adding/removing cookie expires
this.opts.cookie.expires = this.expires;

// Allow the user to do something just before the cookies is added to the headers
if(this.opts.beforeUpdate) {
this.opts.beforeUpdate(this);
}
try {
this.cookies.set(this.opts.cookieName, this.box(), this.opts.cookie);
} catch (x) {
Expand Down