mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
fix(favicon): raise max icon size to 256 KB for hi-res PNGs
DuckDuckGo serves hi-res PNG favicons that legitimately exceed the old 100 KB cap, causing them to be rejected and negatively cached. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,12 @@ verbatim as the GitHub Release notes — so what you write here is what ships.
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Per-feed favicons no longer fail for senders whose DuckDuckGo icon is a
|
||||||
|
hi-res PNG: the maximum accepted favicon size is raised from 100 KB to 256 KB,
|
||||||
|
so legitimate large icons (~107 KB and up) are cached instead of rejected.
|
||||||
|
A domain that was already negatively cached only re-fetches once that entry's
|
||||||
|
TTL expires (and something — a new email or a favicon request — retriggers
|
||||||
|
the fetch); delete its `icon:<domain>` KV key to force an immediate refresh.
|
||||||
- Admin dashboard table view: long feed titles no longer overflow into the Feed
|
- Admin dashboard table view: long feed titles no longer overflow into the Feed
|
||||||
ID column — the title/description cell now shrinks so its text ellipsises.
|
ID column — the title/description cell now shrinks so its text ellipsises.
|
||||||
- RSS and Atom feeds now advertise the WebSub hub inside the feed body
|
- RSS and Atom feeds now advertise the WebSub hub inside the feed body
|
||||||
|
|||||||
@@ -38,8 +38,13 @@ export const ICON_TTL_SECONDS = 7 * 24 * 60 * 60; // 1 week
|
|||||||
*/
|
*/
|
||||||
export const ICON_NEGATIVE_TTL_SECONDS = 6 * 60 * 60; // 6 hours
|
export const ICON_NEGATIVE_TTL_SECONDS = 6 * 60 * 60; // 6 hours
|
||||||
|
|
||||||
/** Maximum accepted favicon size (bytes); larger responses are rejected. */
|
/**
|
||||||
export const MAX_ICON_BYTES = 100 * 1024; // 100 KB
|
* Maximum accepted favicon size (bytes); larger responses are rejected.
|
||||||
|
* DuckDuckGo serves hi-res (often 144×144) PNG favicons that legitimately
|
||||||
|
* exceed 100 KB, so the cap is generous; KV's value limit (25 MB) is the only
|
||||||
|
* hard constraint, even after base64 inflation.
|
||||||
|
*/
|
||||||
|
export const MAX_ICON_BYTES = 256 * 1024; // 256 KB
|
||||||
|
|
||||||
/** Timeout for an outbound favicon fetch (milliseconds). */
|
/** Timeout for an outbound favicon fetch (milliseconds). */
|
||||||
export const ICON_FETCH_TIMEOUT_MS = 5000;
|
export const ICON_FETCH_TIMEOUT_MS = 5000;
|
||||||
|
|||||||
Reference in New Issue
Block a user