Fixed cookie problems

This commit is contained in:
2026-02-16 00:49:10 +01:00
parent c914edd025
commit b2ba4fbcc8
+3 -1
View File
@@ -23,7 +23,7 @@ export function UPGRADE(client: WebSocket, server: WebSocketServer) {
client.send(JSON.stringify({ ok: false, error: "Missing cookies" }));
client.close();
return;
};
}
const supabase = await createClientCookie(new Map(Object.entries(cookies)));
const session = await getSession(supabase);
@@ -33,6 +33,8 @@ export function UPGRADE(client: WebSocket, server: WebSocketServer) {
return;
}
client.send(JSON.stringify({ ok: true }));
client.on("message", async (raw) => {
try {
const msg: ClientMessage = JSON.parse(raw.toString());