Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Related to #3398
Description
NUM_PROXIES
needs to be able to beNone
to disable the feature. I got mixed up about the behaviour of 0 value for it and thought it was the same asNone
, but it's drastically different.None
falls back to default, but0
tells DRF to use the remote address (IP) of the request, which in the case of requests via proxy, is always the last proxy that handled the request. If you set it to 0, then everyone is getting throttled based on the proxy they went through, meaning they're sharing throttle quotas, rather than through their individual IP.Testing Instructions
Run the application and use ipython to verify that
NUM_PROXIES
defaults to None:Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin