From 852e0f5f5bc0b2530bcd4908ea5906d8e0570e9c Mon Sep 17 00:00:00 2001 From: HeagBoKaT Date: Fri, 26 Jun 2026 09:45:35 +0300 Subject: [PATCH] fix: rate limiter was blocking all /api/cats reads after 10 requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uploadLimiter now only applies to POST /api/cats (uploads), not GET reads — previously users were getting 429 after ~10 page navigations. Also remove duplicate file input in ProfilePage and cancel stale rAF on route transition cleanup. Co-Authored-By: Claude Sonnet 4.6 --- client/src/App.tsx | 3 ++- client/src/pages/ProfilePage.tsx | 1 - server/src/index.ts | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 5639ec3..076f13b 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -33,10 +33,11 @@ function AnimatedRoutes() { if (el) { el.classList.remove('page-enter-active'); el.classList.add('page-enter'); - requestAnimationFrame(() => { + const rafId = requestAnimationFrame(() => { el.classList.remove('page-enter'); el.classList.add('page-enter-active'); }); + return () => cancelAnimationFrame(rafId); } }, [location.pathname]); diff --git a/client/src/pages/ProfilePage.tsx b/client/src/pages/ProfilePage.tsx index 0fb9794..29ac0e1 100644 --- a/client/src/pages/ProfilePage.tsx +++ b/client/src/pages/ProfilePage.tsx @@ -268,7 +268,6 @@ export default function ProfilePage() {
-