mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(favicon): per-feed icon from the last sender's domain
Resolve each feed's most recent sender domain and serve its favicon at GET /favicon/:feedId, falling back to the project icon. Icons are fetched in the background on ingestion (direct /favicon.ico then a DuckDuckGo fallback), cached base64 in KV keyed by domain with a 1-week TTL so the fetch only fires when absent. Exposed via RSS <image> / Atom <icon>/<logo> and rendered in the admin feed list, plus a landing-page feature card. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -24,3 +24,12 @@ export const FEEDS_LIST_KEY = "feeds:list";
|
||||
|
||||
/** KV key for the monitoring counters singleton. */
|
||||
export const STATS_KEY = "stats:counters";
|
||||
|
||||
/** Default TTL for a cached per-domain favicon (seconds). */
|
||||
export const ICON_TTL_SECONDS = 7 * 24 * 60 * 60; // 1 week
|
||||
|
||||
/** Maximum accepted favicon size (bytes); larger responses are rejected. */
|
||||
export const MAX_ICON_BYTES = 100 * 1024; // 100 KB
|
||||
|
||||
/** Timeout for an outbound favicon fetch (milliseconds). */
|
||||
export const ICON_FETCH_TIMEOUT_MS = 5000;
|
||||
|
||||
Reference in New Issue
Block a user