diff --git a/README.md b/README.md index 726d059..266c944 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Use images to complement your responses, powered by Brave. ### New Searches (Cache Misses) -- **35 new searches per day per IP** (resets at midnight UTC), then `limit.webp` is served +- **20 new searches per day per IP** (resets at midnight UTC), then `limit.webp` is served - **Cache hits are unlimited** (within WAF limits above) - Failed searches count toward the limit and are remembered for 24h (`bad.webp`) - WAF counters are approximate (not shared perfectly across Cloudflare servers), so bursts may slip slightly past 10 diff --git a/functions/[[path]].js b/functions/[[path]].js index a088e63..64499ac 100644 --- a/functions/[[path]].js +++ b/functions/[[path]].js @@ -132,7 +132,7 @@ export async function onRequest(context) { })); } - if (count > 35) { + if (count > 20) { context.waitUntil(notify(env, { title: "Rate Limit Hit", message: `IP ${ip} hit limit for: ${query}`, tags: "warning,no_entry", priority: 2 })); return env.ASSETS.fetch(new Request(new URL("/limit.webp", url.origin))); } diff --git a/index.html b/index.html index 0677e4c..f931b38 100644 --- a/index.html +++ b/index.html @@ -70,7 +70,7 @@ Use images to complement your responses, powered by Brave. Burst~10 req/10s per IPHTTP 429 (~10s) - New Searches35 per day per IPLimit image served + New Searches20 per day per IPLimit image served

* Cached images don't count toward the daily limit and keep loading after you hit it. The burst limit applies to all image requests and is enforced approximately. The daily limit resets at 00:00 UTC.