Exclude routes from renewing express cookie expiration date
- Dominant language
- JavaScript
- Stars
- 6.4k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
This issues somewhat related to - #452
In my project I need to have dynamic max-age for the set-cookie that authenticate the users.
so on each request the user made to the server the max-age will get updated (in an hour or several..).
However, there is several periodic routes which run every 30 seconds that shouldn't update the cookie max-age (because they are not user action).
So after let say one hour the user didn't do any action in the system, the user session will get expired.
So if I configure the session with 'rooling' set to false (because there are response I don't want to update the max-age), it seem I can't get express
to put 'set-cookie' with my max-age at all (on all requests).
how should I solve this kind of problem? what approach should I take to have express only update the max-age of specific requests.
For example code of the problem - https://stackoverflow.com/questions/40403609/how-to-exclude-routes-from-renewing-express-cookie-expiration-date
Contributor guide
Assessment
This issue has not been assessed yet.