express icon indicating copy to clipboard operation
express copied to clipboard

Don't automatically add Expires in res.cookie if expires option is explicitly set to 0

Open nbkhope opened this issue 1 year ago • 0 comments

This addresses https://github.com/expressjs/express/issues/5150

Those who wish to exclude Expires (but still keep Max-Age from the final Set-Cookie statement cannot do so if maxAge option is passed to res.cookie).

This proposed solution allows one to exclude Expires if expires: 0 option is passed to res.cookie.

nbkhope avatar Mar 19 '23 06:03 nbkhope