Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Allow None value for `NUM_PROXIES` (#3409)

sarayourfriendba2e92ff8388
diff --git a/api/conf/settings/rest_framework.py b/api/conf/settings/rest_framework.py
index b176beefc..80d7b45c5 100644
--- a/api/conf/settings/rest_framework.py
+++ b/api/conf/settings/rest_framework.py
@@ -50,7 +50,9 @@ REST_FRAMEWORK = {
"DEFAULT_SCHEMA_CLASS": "api.docs.base_docs.MediaSchema",
# https://www.django-rest-framework.org/api-guide/throttling/#how-clients-are-identified
# Live environments should configure this to an appropriate number
- "NUM_PROXIES": config("NUM_PROXIES", default=0, cast=int),
+ "NUM_PROXIES": config(
+ "NUM_PROXIES", default=None, cast=lambda x: int(x) if x is not None else None
+ ),
}
if config("DISABLE_GLOBAL_THROTTLING", default=True, cast=bool):