🔧 Title: Add rate limiting per user (not just per IP)
📘 Description
The current rate limiter is IP-based. Authenticated users behind a shared IP (corporate NAT, VPN) share the same rate limit bucket. High-volume legitimate users can be blocked by a single bad actor on the same IP. Per-user rate limiting is more accurate.
✅ Acceptance Criteria
🔧 Context: backend/src/middleware/rateLimiter.js.
🔧 Title: Add rate limiting per user (not just per IP)
📘 Description
The current rate limiter is IP-based. Authenticated users behind a shared IP (corporate NAT, VPN) share the same rate limit bucket. High-volume legitimate users can be blocked by a single bad actor on the same IP. Per-user rate limiting is more accurate.
✅ Acceptance Criteria
req.user.idas the key for authenticated routes🔧 Context:
backend/src/middleware/rateLimiter.js.