koajs / generic-session

koa session store with memory, redis or others.
MIT License
414 stars 65 forks source link

When I Set session = null, signed Cookied hasn't been remove #79

Closed CoderIvan closed 8 years ago

CoderIvan commented 8 years ago

From Example:

When I visit [http://localhost:3000/get](), I get two cookies:

image

But When I visit [http://localhost:3000/remove](), there koa.sid.sig hasn't been remove

image

CoderIvan commented 8 years ago

https://github.com/koajs/generic-session/blob/master/lib/session.js#L97

I think the code this.cookies.set(key, null) should be changed to this.cookies.set(key, null, {signed: cookie.signed})

dead-horse commented 8 years ago

there is a PR working on this: https://github.com/koajs/generic-session/pull/74/files

CoderIvan commented 8 years ago

Thanks