fix: plausible blocked by rate limit#388
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughAdjusted middleware to bypass rate limiting for Plausible Analytics endpoints by checking pathnames for '/api/event' and '/js/script'. Reformatted CSRF failure log tags across multiple lines without semantic change. Performed minor whitespace/formatting tweaks with no functional impact. No changes to exported/public signatures. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant M as Middleware
participant RL as RateLimiter
participant H as Next Handler
C->>M: HTTP request
alt Path is Plausible endpoint (/api/event or /js/script)
note over M: Bypass rate limiting
M->>H: Forward request
H-->>C: Response
else Other paths
M->>RL: applyRateLimit(request)
RL-->>M: Allow or Block
alt Allowed
M->>H: Forward request
H-->>C: Response
else Blocked
M-->>C: 429 Too Many Requests
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit