Enable global rate limiting
@@ -87,7 +87,15 @@ REST_FRAMEWORK = {
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
- )
+ ),
+ 'DEFAULT_THROTTLE_CLASSES': (
+ 'rest_framework.throttling.AnonRateThrottle',
+ 'rest_framework.throttling.UserRateThrottle'
+ ),
+ 'DEFAULT_THROTTLE_RATES': {
+ 'anon': '200/minute',
+ 'user': '200/minute'
+ },
}
CACHES = {
