Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rolling function as options #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Japjappedulap
Copy link

A new option rollingFunction was added. This will determine if the cookie will be set on a request, similar to the rolling option.

Session are rolled by default only on the store, without their .cookie being altered. On each request, a touch is made to the store, meaning that the object's expire is reseted and will live longer than the user's session, leading to different expire dates between the store and the user session. This behaviour has already been reported.

Using rolling will set-cookie with the same session ID, but with reseted maxAge, this is the desired behaviour, as the session is extended and the expires are equal between the client and the server.

Somehow, we need to be able to conditionally or manually roll sessions. This is where rollingFunction comes in handy.

A new option `rollingFunction` was added. This will determine if the cookie will be set on a request, similar to the `rolling` option.
@Japjappedulap Japjappedulap added the enhancement New feature or request label Nov 29, 2019
@Japjappedulap Japjappedulap added the do not merge do not merge label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge do not merge enhancement New feature or request
Projects
None yet
1 participant