Description
Our production FastAPI backend currently accepts unrestricted requests. To prevent abuse of our Hugging Face inference resources and Supabase database, we need rate limiting.
Tasks
- Install
slowapi in the backend API.
- Configure a rate limiter (e.g., 20 requests/minute per IP) for the
/api/v1/scan-auto and /api/v1/maps/markets endpoints.
- Return clean
429 Too Many Requests JSON responses when the limit is hit.
Description
Our production FastAPI backend currently accepts unrestricted requests. To prevent abuse of our Hugging Face inference resources and Supabase database, we need rate limiting.
Tasks
slowapiin the backend API./api/v1/scan-autoand/api/v1/maps/marketsendpoints.429 Too Many RequestsJSON responses when the limit is hit.