diff --git a/backend/backend/settings/deps/restframework.py b/backend/backend/settings/deps/restframework.py index e31ca8b78..c00461883 100644 --- a/backend/backend/settings/deps/restframework.py +++ b/backend/backend/settings/deps/restframework.py @@ -22,8 +22,8 @@ 'rest_framework.throttling.AnonRateThrottle', ], 'DEFAULT_THROTTLE_RATES': { - 'anon': '120/minute', - 'login': '120/minute', + 'anon': f'{os.environ.get("DEFAULT_THROTTLE_RATES", 40)}/minute', + 'login': f'{os.environ.get("DEFAULT_THROTTLE_RATES", 40)}/minute', }, 'DEFAULT_PARSER_CLASSES': [ 'rest_framework.parsers.JSONParser', diff --git a/skaffold.yaml b/skaffold.yaml index 6e4275fd5..fc8b218e1 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -148,6 +148,8 @@ deploy: # Should be a json list - name: CORS_ORIGIN_WHITELIST value: '["http://substra-frontend.node-1.com/"]' + - name: DEFAULT_THROTTLE_RATES + value: '30' - name: backend-org-2 chartPath: charts/substra-backend @@ -194,6 +196,8 @@ deploy: # Should be a json list - name: CORS_ORIGIN_WHITELIST value: '["http://substra-frontend.node-2.com/"]' + - name: DEFAULT_THROTTLE_RATES + value: '30' profiles: - name: prod