fix(dns): blocklist als ||domain^ statt apex-only → blockt Subdomains

Apex-only-Format (bare domain) blockte nur z.B. bet365.com, NICHT
www.bet365.com — Casino-Content + Google-Ad-Links liegen aber auf www.
Adblock-Syntax ||domain^ deckt Domain + alle Subdomains ab.
Betrifft alle DNS-Plattformen (Mac/Windows/DoH-Server).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-06-07 13:26:16 +02:00
parent 7f529c3be3
commit 80be124592

View File

@ -11,7 +11,10 @@ import { getActiveBlocklistDomains } from "../../db/domains";
*/
export default defineEventHandler(async (event) => {
const domains = await getActiveBlocklistDomains();
const body = domains.map((d) => d.domain).join("\n") + "\n";
// Adblock-Syntax `||domain^` blockt die Domain UND alle Subdomains (www, m, …).
// Plain-Domain-Format ist Apex-only — www.bet365.com etc. blieben sonst offen
// (Casino-Content liegt fast immer auf www / Google-Ad-Links zeigen dorthin).
const body = domains.map((d) => `||${d.domain}^`).join("\n") + "\n";
setHeader(event, "Content-Type", "text/plain; charset=utf-8");
setHeader(event, "Cache-Control", "public, max-age=300");