-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
P1Priority: highPriority: highbackendBackend relatedBackend relatedsecuritySecurity relatedSecurity related
Description
Problem
Rate limiting infrastructure is implemented (api/rate_limit.py with slowapi + Redis) and configured in settings, but no endpoints use the @limiter.limit() decorator. Resource-intensive endpoints can be called without restriction.
Impact
/api/optimize/routeand/api/voyage/calculateare CPU-intensive and can be hammered- No per-API-key rate limits despite having the infrastructure
- No protection against abuse
Steps to fix
- Add rate limit decorators to endpoints:
- Heavy computation:
@limiter.limit("10/minute")for optimize, voyage - File uploads:
@limiter.limit("10/minute")for RTZ parse, CSV upload - Standard:
@limiter.limit("60/minute")for other endpoints
- Heavy computation:
- Add 429 error handler for
RateLimitExceeded - Test rate limiting behavior
Files
api/rate_limit.pyapi/main.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Priority: highPriority: highbackendBackend relatedBackend relatedsecuritySecurity relatedSecurity related