From 96c0c18d979a31b6a2e9e07a9dc5c67f1e51ddac Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Sun, 6 Sep 2026 23:29:40 -0400 Subject: [PATCH] Referrers count only on pages we served A scanner forging google.com on /.env showed as forty-eight Google readers before breakfast. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- deploy/wizwar-rollup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/wizwar-rollup.sh b/deploy/wizwar-rollup.sh index b39bdd4..7ec67ae 100755 --- a/deploy/wizwar-rollup.sh +++ b/deploy/wizwar-rollup.sh @@ -69,7 +69,10 @@ for f in sorted(glob.glob("/var/lib/caddy/access*.log*")): m = re.match(r"https?://([^/]+)", ref) host = m.group(1) if m else "" ours = host.endswith("kestrelsnest.social") or "104.236.96.198" in host - if host and not ours and not isbot: refs[host] += 1 + # A referrer on /.env is a scanner's costume (a forged google.com), + # not a reader — and the app answers unknown paths with the page, + # so the status cannot tell them apart. Only the pages count. + if host and not ours and not isbot and key in ("/", "/clips", "/watch"): refs[host] += 1 # --- the table --- new_rooms = 0; seats = collections.Counter()