A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
98
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove admin auth from tap POST handler

+1 -8
+1 -8
tap/src/main.ts
··· 4 4 import { asc, inArray } from "drizzle-orm"; 5 5 import { omit } from "@es-toolkit/es-toolkit/compat"; 6 6 import type { SelectEvent } from "./schema/event.ts"; 7 - import { assureAdminAuth, parseTapEvent } from "@atproto/tap"; 7 + import { parseTapEvent } from "@atproto/tap"; 8 8 import { addToBatch, flushBatch } from "./batch.ts"; 9 9 10 10 const PAGE_SIZE = 100; 11 11 const YIELD_EVERY_N_PAGES = 5; 12 12 const YIELD_DELAY_MS = 100; 13 - const ADMIN_PASSWORD = Deno.env.get("TAP_ADMIN_PASSWORD")!; 14 13 15 14 interface ClientState { 16 15 socket: WebSocket; ··· 72 71 73 72 Deno.serve({ port: parseInt(Deno.env.get("WS_PORT") || "2481") }, (req) => { 74 73 if (req.method === "POST") { 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 74 const evt = parseTapEvent(req.body); 82 75 switch (evt.type) { 83 76 case "identity": {