mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-03-17 03:01:01 +00:00
Fix: Update daily search rate limit to 15
This commit is contained in:
@@ -44,7 +44,7 @@ export async function onRequest(context) {
|
|||||||
const rateList = await env.DIRECT_IMG_RATE.list({ prefix: ratePrefix });
|
const rateList = await env.DIRECT_IMG_RATE.list({ prefix: ratePrefix });
|
||||||
const count = rateList.keys.length;
|
const count = rateList.keys.length;
|
||||||
|
|
||||||
if (count >= 25) {
|
if (count >= 15) {
|
||||||
context.waitUntil(notify(env, {
|
context.waitUntil(notify(env, {
|
||||||
title: "Rate Limit Hit",
|
title: "Rate Limit Hit",
|
||||||
message: `IP ${ip} reached limit for: ${query}`,
|
message: `IP ${ip} reached limit for: ${query}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user