Skip to content

fix: refresh cookie options for rolling sessions#1125

Open
raashish1601 wants to merge 1 commit into
expressjs:masterfrom
raashish1601:spark/session-rolling-cookie-options
Open

fix: refresh cookie options for rolling sessions#1125
raashish1601 wants to merge 1 commit into
expressjs:masterfrom
raashish1601:spark/session-rolling-cookie-options

Conversation

@raashish1601
Copy link
Copy Markdown

Changes

  • Ensure cookie options are re-applied for each request when rolling: true, so updated config is reflected for existing sessions.
  • Extracted cookie creation into a shared helper for consistency between new and existing sessions.
  • Added regression test for an existing session receiving updated cookie attributes/expiry on rolling requests.

Validation

  • node node_modules/mocha/bin/mocha --require test/support/env --check-leaks --no-exit --reporter spec --grep "rolling option" test/session.js
  • node node_modules/mocha/bin/mocha --require test/support/env --check-leaks --no-exit --reporter spec test/session.js
  • node node_modules/eslint/bin/eslint.js index.js test/session.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant