aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/throttling.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/throttling.py')
-rw-r--r--rest_framework/throttling.py2
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