Fixed cookie problems
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user