Improved custom throttling

This commit is contained in:
Spitap
2023-01-27 16:55:45 +01:00
parent 0d2f3d05a3
commit 2e9f43d3a7
3 changed files with 12 additions and 22 deletions
+1 -3
View File
@@ -189,14 +189,12 @@ REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': [
'rest_framework.throttling.AnonRateThrottle',
'rest_framework.throttling.ScopedRateThrottle',
'modoboa.lib.throttle.UserDosThrottle',
'modoboa.lib.throttle.AnonDosThrottle'
'modoboa.lib.throttle.UserDosThrottle'
],
'DEFAULT_THROTTLE_RATES': {
'anon': '100/hour',
'login': '3/minute',
'ddos': '100/minute',
'anon_ddos': '10/minute',
'password_recovery_request': '6/hour',
'password_recovery_totp_check': '20/hour',
'password_recovery_apply': '20/hour'