Files
direct-img.link/assets/rate-limit.js
T
multipleof4andClaude Opus 5.5 1ebcfc777e Perf: Serve homepage and assets without invoking Functions
Add _routes.json so /, /robots.txt and /assets/* skip the worker and
don't count against the Functions request quota. rate-limit.js moves to
assets/ so the homepage reads it client-side instead of via HTMLRewriter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:43:25 -07:00

7 lines
387 B
JavaScript

// New searches (cache misses) allowed per IP per day, reset at 00:00 UTC. Cache hits never count.
// Safe to edit by hand. Imported by the worker and by the homepage (as a static file, so no Functions quota);
// README.md needs a manual update.
// The burst limit (~10 req/10s) is a Cloudflare WAF rule, not set here.
export const DAILY_LIMIT = 35;
export const FREE_DAILY_LIMIT = 100;