You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 when maxAge 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 with expires option
The text was updated successfully, but these errors were encountered:
Finally, to remove a cookie, the server returns a Set-Cookie header
with an expiration date in the past. The server will be successful
in removing the cookie only if the Path and the Domain attribute in
the Set-Cookie header match the values used when the cookie was
created.
We return new Date(1), which is Thu Jan 01 1970 01:00:00
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: