This commit is contained in:
Mateusz Gruszczyński
2026-05-08 19:23:11 +02:00
parent 7bedeec39f
commit f76609672d
4 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ TRACKER_CACHE_TTL_SECONDS = 7 * 24 * 60 * 60
FAVICON_CACHE_TTL_SECONDS = 7 * 24 * 60 * 60
TRACKER_SCAN_LIMIT = 80
FAVICON_DIR = BASE_DIR / "data" / "tracker_favicons"
PUBLIC_FAVICON_BASE = "/static/data/tracker_favicons"
PUBLIC_FAVICON_BASE = "/static/tracker_favicons"
class _IconParser(HTMLParser):
@@ -161,7 +161,7 @@ def summary(profile: dict, hashes: list[str], loader, scan_limit: int = TRACKER_
def favicon_public_url(domain: str, enabled: bool = True, create: bool = False) -> str:
"""Return the static URL for a cached tracker favicon, optionally creating it first."""
# Note: Favicon files are stored under data/tracker_favicons and can be served by the static/data symlink.
# Note: Favicon files stay in data/tracker_favicons, but the browser loads them via the static/tracker_favicons symlink.
clean = tracker_domain(domain)
if not enabled or not clean:
return ""