chore: update content, sitemap and lib files

This commit is contained in:
MichalC
2026-08-01 14:01:54 +02:00
parent 6808dee9be
commit 092cff1899
8 changed files with 8 additions and 19 deletions
+2 -2
View File
@@ -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);