-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Open
Copy link
Labels
featureAdd a new featureAdd a new feature
Description
We need to integrate SlowAPI to enable request rate limiting across API endpoints.
This will help protect the application from abuse, prevent API flooding, and improve service reliability.
✅ Tasks
- Install SlowAPI package
- Initialize Limiter instance in FastAPI application startup
- Configure key_func using get_remote_address
- Set up default in-memory backend for development
- Add Redis backend configuration for production environments
- Apply rate limits on key API routes (e.g., /auth/login, /cart/*, /products)
- Add error handler for RateLimitExceeded
- Add integration test to verify rate-limiting works
- Update API documentation with rate-limit information
💡 Notes
- For local testing, the in-memory backend is sufficient.
- In production, Redis must be shared across all instances for consistent limits.
- Reference: SlowAPI GitHub
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureAdd a new featureAdd a new feature
Type
Projects
Status
Todo