A decentralized music tracking and discovery platform built on AT Protocol 🎵

Log unauthorized access attempts

Include the Authorization header in a logger.warn when admin auth
fails to assist debugging and trace unauthorized requests.
Log unauthorized access attempts

+2 -1
+2 -1
tap/src/main.ts
··· 75 try { 76 assureAdminAuth(ADMIN_PASSWORD, req.headers.get("authorization")!); 77 } catch { 78 return new Response(null, { status: 401 }); 79 } 80 const evt = parseTapEvent(req.body); ··· 120 } 121 } 122 123 - return new Response(""); 124 } 125 126 if (req.headers.get("upgrade") != "websocket") {
··· 75 try { 76 assureAdminAuth(ADMIN_PASSWORD, req.headers.get("authorization")!); 77 } catch { 78 + logger.warn`Unauthorized access attempt ${req.headers.get("authorization")}`; 79 return new Response(null, { status: 401 }); 80 } 81 const evt = parseTapEvent(req.body); ··· 121 } 122 } 123 124 + return new Response(null, { status: 200 }); 125 } 126 127 if (req.headers.get("upgrade") != "websocket") {