asdfasfsd
All checks were successful
/ build (push) Successful in 15s

This commit is contained in:
Soph :3 2024-05-23 17:48:59 +03:00
parent 51b720672b
commit 756d667514
Signed by: sophie
GPG key ID: EDA5D222A0C270F2

View file

@ -53,6 +53,8 @@ export default new Elysia({
}
}
console.log("CSRF check passed")
// use headers instead of Cookie API to prevent type coercion
const cookieHeader = context.request.headers.get("Cookie") ?? "";
const sessionId = lucia.readSessionCookie(cookieHeader);
@ -62,6 +64,7 @@ export default new Elysia({
session: null,
};
}
console.log("Cookie exists")
const { session, user } = await lucia.validateSession(sessionId);
if (session && session.fresh) {