diff options
| author | José Padilla | 2015-01-12 08:12:24 -0400 | 
|---|---|---|
| committer | José Padilla | 2015-01-12 08:12:24 -0400 | 
| commit | cc13ee0577fb3de9602da634ab9c835749da49c4 (patch) | |
| tree | bbf8f0488945a6d8105c156d962cd0c6e400afd8 /rest_framework/throttling.py | |
| parent | d6d08db0dd16f4a4a93b69ecf1c5948f375335b0 (diff) | |
| download | django-rest-framework-cc13ee0577fb3de9602da634ab9c835749da49c4.tar.bz2 | |
Fix error when NUM_PROXIES is greater than one
Diffstat (limited to 'rest_framework/throttling.py')
| -rw-r--r-- | rest_framework/throttling.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index 7dfe2f96..0f10136d 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -32,7 +32,7 @@ class BaseThrottle(object):              if num_proxies == 0 or xff is None:                  return remote_addr              addrs = xff.split(',') -            client_addr = addrs[-min(num_proxies, len(xff))] +            client_addr = addrs[-min(num_proxies, len(addrs))]              return client_addr.strip()          return ''.join(xff.split()) if xff else remote_addr | 
