Skip to content

Commit

Permalink
Allow None value for NUM_PROXIES (#3409)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend authored Nov 29, 2023
1 parent fd73fcc commit ba2e92f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/conf/settings/rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"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):
Expand Down

0 comments on commit ba2e92f

Please sign in to comment.