Skip to content

Commit

Permalink
Configure the number of proxies to fix anon rate limiting (#3344)
Browse files Browse the repository at this point in the history
* Configure the number of proxies to fix anon rate limiting

* Update api/conf/settings/rest_framework.py
  • Loading branch information
sarayourfriend authored Nov 13, 2023
1 parent 6ede4ad commit 9ada4c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/conf/settings/rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@
**{k: None for k, _ in REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"].items()}
)
del REST_FRAMEWORK["DEFAULT_THROTTLE_CLASSES"]

# https://www.django-rest-framework.org/api-guide/throttling/#how-clients-are-identified
# We override this in live environments to an appropriate number based on our deployment
NUM_PROXIES = config("NUM_PROXIES", default=0, cast=int)

0 comments on commit 9ada4c8

Please sign in to comment.