Closed interpretor closed 1 year ago
Hey @interpretor!
Thanks for your contribution ❤️ 💯 This is a great addition (: We'll review and hopefully land it shortly. one quick question: Does this also already address your issue #38?
Hey @BracketJohn,
you're welcome :) No this doesn't solve #38, it just adds the rolling option without touching the behavior of the module.
@interpretor, sorry that the review is taking longer, I'm currently a bit overwhelmed by the other project, but will come back to you shortly! 🎉
Thanks for the awesome contribution @interpretor 🖤
Add rolling as an option to be able to force the session identifier cookie to be set on every response. The expiration is reset to the original
expiryInSeconds
, resetting the expiration countdown.This is typically used in conjuction with short
expiryInSeconds
values to provide a quick timeout of the session data with reduced potential of it occurring during on going server interactions.This should behave similar to the rolling option in
express-session
middleware.To implement this, it was necessary to set the
expires
property of the cookie instead ofmaxAge
, which doesn't affect the current behavior of the middleware.