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 <[email protected]>
This commit is contained in:
1 parent
fd3ff8c40a
commit
a353de1342
2 files changed
+13
-2
No files matched your search
@@ -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
|
||||
|
||||
/** 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). */
|
||||
export const ICON_FETCH_TIMEOUT_MS = 5000;
|
||||
|
||||
Reference in new issue
Block a user