mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.12k stars 173 forks source link

Protect the API from Bruteforce/DDOS #224

Open benoit-cty opened 3 years ago

benoit-cty commented 3 years ago

We need a way to disable a user that made too many calls per minutes.

benoit-cty commented 6 months ago

We could do it using Redis Lua script, see: https://git.leximpact.dev/leximpact/communs/leximpact-common-python-libraries/-/blob/master/leximpact_common_python_libraries/cache.py?ref_type=heads#L126