Open iliakan opened 6 years ago
I encountered the same bug/problem (?) and currently work around this by:
ctx.cookies.set(myFancyNameVar, '', {
httpOnly: true,
maxAge: 0
});
which is ugly since I don't want to restate the opts nor to access cookies directly.
Can this issue be addressed?
Server should respond with an expired date to clear the cookies in the browser. This should be expected behavior when setting ctx.session = null;
@cmur2 your solution didn't work for me to clear the cookie(s).
I'm using
koa-session
with params:Session removal does this:
ctx.cookies.set(key, '', opts)
.Unfortunately, in "cookies" module,
toHeader
has this:So no value (cookie deletion) actually leads to empty cookie with future expiration.