mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: cookies: fix sesssion recreate
This commit is contained in:
1 file changed
+1
-1
@@ -84,7 +84,7 @@ export default async (ctx: KoaContext, next: Next) => {
|
|||||||
await token.update(ctx.session._id, token.TYPE_SESSION, expireSeconds, omit(ctx.session, ['_id', 'recreate']));
|
await token.update(ctx.session._id, token.TYPE_SESSION, expireSeconds, omit(ctx.session, ['_id', 'recreate']));
|
||||||
} else {
|
} else {
|
||||||
Object.assign(ctx.session, { createIp: request.ip, createUa: ua, createHost: request.host });
|
Object.assign(ctx.session, { createIp: request.ip, createUa: ua, createHost: request.host });
|
||||||
[ctx.session._id] = await token.add(token.TYPE_SESSION, expireSeconds, ctx.session);
|
[ctx.session._id] = await token.add(token.TYPE_SESSION, expireSeconds, omit(ctx.session, ['_id', 'recreate']));
|
||||||
}
|
}
|
||||||
if (!request.websocket) {
|
if (!request.websocket) {
|
||||||
const options: any = {
|
const options: any = {
|
||||||
|
|||||||
Reference in new issue
Block a user