diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index 1c8c6941d..982ca73d9 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -19,6 +19,10 @@ class BaseThrottle(object): raise NotImplementedError('.allow_request() must be overridden') def get_ident(self, request): + """ + Identify the machine making the request using HTTP_X_FORWARDED_FOR if + present, if not use REMOTE_ADDR. + """ if 'HTTP_X_FORWARDED_FOR' in request.META: xff = request.META.get('HTTP_X_FORWARDED_FOR') num_proxies = api_settings.NUM_PROXIES