root: add global fallback throttle
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
a3cc844e25
commit
2112b5b26b
|
@ -55,6 +55,7 @@ throttle:
|
||||||
providers:
|
providers:
|
||||||
oauth2:
|
oauth2:
|
||||||
device: 20/hour
|
device: 20/hour
|
||||||
|
default: 1000/second
|
||||||
|
|
||||||
outposts:
|
outposts:
|
||||||
# Placeholders:
|
# Placeholders:
|
||||||
|
|
|
@ -174,6 +174,10 @@ REST_FRAMEWORK = {
|
||||||
],
|
],
|
||||||
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
||||||
"TEST_REQUEST_DEFAULT_FORMAT": "json",
|
"TEST_REQUEST_DEFAULT_FORMAT": "json",
|
||||||
|
"DEFAULT_THROTTLE_CLASSES": ["rest_framework.throttling.AnonRateThrottle"],
|
||||||
|
"DEFAULT_THROTTLE_RATES": {
|
||||||
|
"anon": CONFIG.y("throttle.default"),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
REDIS_PROTOCOL_PREFIX = "redis://"
|
REDIS_PROTOCOL_PREFIX = "redis://"
|
||||||
|
|
Reference in a new issue