diff --git a/dandiapi/settings.py b/dandiapi/settings.py index 464618fd5..7ed9df4b7 100644 --- a/dandiapi/settings.py +++ b/dandiapi/settings.py @@ -188,6 +188,9 @@ def mutate_configuration(configuration: type[ComposedConfiguration]): configuration.INSTALLED_APPS.remove('composed_configuration.sentry.apps.SentryConfig') # In production, enable rate limiting for unauthenticated users + configuration.REST_FRAMEWORK['DEFAULT_THROTTLE_CLASSES'] = [ + 'rest_framework.throttling.AnonRateThrottle', + ] configuration.REST_FRAMEWORK['DEFAULT_THROTTLE_RATES'] = { 'anon': '300/minute', }