cancer finally fixed
All checks were successful
/ build (push) Successful in 14s

This commit is contained in:
Soph :3 2024-05-23 17:57:17 +03:00
parent 83bd59cfe2
commit 983f0aa9e2
Signed by: sophie
GPG key ID: EDA5D222A0C270F2

View file

@ -40,8 +40,6 @@ export default new Elysia({
if (context.request.method !== "GET") {
const originHeader = context.request.headers.get("Origin");
// NOTE: You may need to use `X-Forwarded-Host` instead
console.log(context.request.headers)
console.log(originHeader);
if (
!originHeader ||
!verifyRequestOrigin(originHeader, ["chat.sad.ovh", "localhost:5173"])
@ -53,8 +51,6 @@ 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);
@ -64,7 +60,6 @@ export default new Elysia({
session: null,
};
}
console.log("Cookie exists")
const { session, user } = await lucia.validateSession(sessionId);
if (session && session.fresh) {