问题
I am using cookie-parser to create a http-only cookie that holds the token for a logged-in user.
Then I need to either destroy that cookie or make it expire, when the user hits "logout".
How can I destroy (or at least edit) the cookie?
Will the following do the trick ?
res.cookie("SESSIONID", null, {httpOnly:true, secure:true});
Thank you
来源:https://stackoverflow.com/questions/51116246/destroy-http-only-cookie-with-cookie-parser