-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
clearCookie does not include maxAge, neither allows to pass it as options #303
Comments
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Latest RFC says:
We return Our implementation is correct |
Adding Yet it would improve devX for many users. |
Prerequisites
Fastify version
5.0
Plugin version
v10.0.1
Node.js version
any
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
any
Description
These are the problematic lines:
fastify-cookie/plugin.js
Lines 42 to 46 in ccb9053
Without
maxAge: 0
at least some of cookie jar implementations (for example https://www.npmjs.com/package/tough-cookie) keep actual cookie with empty value in the storage instead of deleting them (like they do whenmaxAge
is set to zero).Because of this flaw some users had to come up with workarounds like this.
Link to code that reproduces the bug
No response
Expected Behavior
maxAge
should be set along withexpires
optionThe text was updated successfully, but these errors were encountered: