Closed valaxy closed 6 years ago
how do you close the browser. you need to quit it completely if you are using macbook. Clicking on the close button does not quit the app. I had the same problem before. Thought I closed the browser.
i use the maxAge: 'session' is not work as expected too. i have to set maxAge = 'session' every time, when i want to set session to user.
+1
fix from https://github.com/koajs/session/commit/c487944c22056fdd37433bdeab3d665dbd116744 is not working
I have workaround for this behaviour:
app.use(KoaSesson({
key: 'some-session-key',
maxAge: 'session',
beforeSave() {
this.maxAge = 'session';
},
}, app))
beforeSave callback restoring maxAge value correctly, otherwise it is replaced with ONE_DAY value
https://github.com/koajs/session/pull/136 fixed this bug
reproduce the problem:
http://localhost:13001/
and refresh the page many timeshttp://localhost:13001/
and refresh many timesWhere could the bug come from? I doubt that bug may be produced at https://github.com/koajs/session/blob/master/lib/context.js#L293