Update auth.ts
This commit is contained in:
@@ -104,7 +104,7 @@ export async function supaAuthenticateUser(
|
|||||||
status?: number;
|
status?: number;
|
||||||
plan?: PlanType;
|
plan?: PlanType;
|
||||||
}> {
|
}> {
|
||||||
console.log(req.headers);
|
|
||||||
const authHeader = req.headers.authorization ?? (req.headers["sec-websocket-protocol"] ? `Bearer ${req.headers["sec-websocket-protocol"]}` : null);
|
const authHeader = req.headers.authorization ?? (req.headers["sec-websocket-protocol"] ? `Bearer ${req.headers["sec-websocket-protocol"]}` : null);
|
||||||
if (!authHeader) {
|
if (!authHeader) {
|
||||||
return { success: false, error: "Unauthorized", status: 401 };
|
return { success: false, error: "Unauthorized", status: 401 };
|
||||||
|
|||||||
Reference in New Issue
Block a user