mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-03-16 18:51:01 +00:00
Feat: Increase daily search rate limit from 10 to 25
This commit is contained in:
@@ -44,7 +44,7 @@ export async function onRequest(context) {
|
||||
const rateData = await env.DIRECT_IMG_RATE.get(rateKey, "json");
|
||||
const count = rateData?.c || 0;
|
||||
|
||||
if (count >= 10) {
|
||||
if (count >= 25) {
|
||||
context.waitUntil(notify(env, {
|
||||
title: "Rate Limit Hit",
|
||||
message: `IP ${ip} reached limit for: ${query}`,
|
||||
@@ -52,7 +52,7 @@ export async function onRequest(context) {
|
||||
priority: 2
|
||||
}));
|
||||
return jsonResponse(429, {
|
||||
error: "Daily search limit reached (10/day). Cached images remain available.",
|
||||
error: "Daily search limit reached (25/day). Cached images remain available.",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user