Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Separate cookie maxAge option from external store ttl#199

Open
ejose19 wants to merge 2 commits into
koajs:master from
ejose19:master
Open

Separate cookie maxAge option from external store ttl #199
ejose19 wants to merge 2 commits into
koajs:master from
ejose19:master

Conversation

@ejose19

@ejose19 ejose19 commented May 24, 2020

Copy link
Copy Markdown

This PR allows to individually control cookie maxAge and external store TTL, for the cases where an unified control is not desired (like using with koa-redis).

Usage:

  • maxAge remains the same
  • ttl default is maxAge, unless maxAge is set to 'session' and ttl defaults to ONE_DAY
    allowed values for ttl are: 'permanent' (passes undefined ttl to external store) or any integer value

Previously using maxAge = 'session' with koa-redis would give an out of range error (since koa-redis is trying to insert word 'session' under ttl, with this implementation it will pass an integer value to ttl or if set as 'permanent', undefined and koa-redis will store without any ttl)

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 2f6926f on ejose19:master into f765595 on koajs:master.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /