chore: update content, sitemap and lib files
This commit is contained in:
+2
-2
@@ -12,10 +12,10 @@ export function escapeHtml(unsafe: string): string {
|
||||
|
||||
const rateLimitMap = new Map<string, { count: number; expiresAt: number }>();
|
||||
const MAX_REQUESTS = 5;
|
||||
const WINDOW_MS = 10 * 60 * 1000; // 10 minutes
|
||||
const WINDOW_MS = 10 * 60 * 1000;
|
||||
|
||||
export function rateLimit(ip: string | undefined | null): boolean {
|
||||
if (!ip) return true; // fallback if IP can't be resolved
|
||||
if (!ip) return true;
|
||||
|
||||
const now = Date.now();
|
||||
const entry = rateLimitMap.get(ip);
|
||||
|
||||
Reference in New Issue
Block a user