Thanks for your reply!
However, I still see a problem here.
I have checked the source code of express (3.0.2), and it looks there is a bug (or the
documentation is not correct)
The line in function cookie (response.js):
if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge);
does not modify the value in options.maxAge,
Then, in function serialize of the cookie module:
if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge);
To be consistent, the documentation should be corrected, or the source code fixed.
if ('maxAge' in options) { options.expires = new Date(Date.now() + options.maxAge); options.maxAge /= 1000; }
I hope this helps.