fix: increase RateLimiter maxSize to prevent IP eviction (#5893)#5929
Conversation
maxSize=1 allowed only one IP to be tracked, evicting entries for other IPs. This effectively disabled rate limiting for all users. Fixes JhaSourav07#5893
|
@vipul674 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@JhaSourav07 Ready for review. |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
|
@JhaSourav07 Review Reminder |
Aamod007
left a comment
There was a problem hiding this comment.
Difficulty: beginner – Increases RateLimiter maxSize from 1 to 10,000 in ci-analytics and pr-insights routes to prevent IP eviction.
Quality: clean – Simple config fix.
Type: bug – Fixes issue #5893, prevents premature IP eviction.
Good fix!
|
🎉 Congratulations @vipul674! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Fixes #5893
Problem
RateLimiter was instantiated with
maxSize=1, allowing only one IP to be tracked at a time. When a new IP made a request, the previous IP's entry was evicted, effectively disabling rate limiting for all users except the most recent one.Fix
Increased
maxSizefrom1to10_000in both ci-analytics and pr-insights route rate limiters, matching the default used elsewhere in the codebase.