just remove session cookie, if its set
This commit is contained in:
parent
46cf6081af
commit
c5f842b409
3
mod.ts
3
mod.ts
|
@ -308,10 +308,12 @@ export class HTTPServer {
|
||||||
maxAge: this.settings.sessionExpire ?? undefined,
|
maxAge: this.settings.sessionExpire ?? undefined,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (routeRequest.cookie("session")) {
|
||||||
routeReply.cookie("session", undefined);
|
routeReply.cookie("session", undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
if (this.server) {
|
if (this.server) {
|
||||||
|
@ -468,6 +470,7 @@ export class RouteRequest {
|
||||||
try {
|
try {
|
||||||
this.session = JSON.parse(decodedSessionCookie);
|
this.session = JSON.parse(decodedSessionCookie);
|
||||||
} catch (_err) {
|
} catch (_err) {
|
||||||
|
console.log(_err);
|
||||||
// Ignore if sessionCookie is not in JSON format
|
// Ignore if sessionCookie is not in JSON format
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user