Commit 5333a931 by Xavier Ordoquy

Merge pull request #1409 from tuky/patch-1

remove spaces from META['HTTP_X_FORWARDED_FOR'] as throttle key
parents d8fb81ce 5e433684
......@@ -157,6 +157,8 @@ class AnonRateThrottle(SimpleRateThrottle):
ident = request.META.get('HTTP_X_FORWARDED_FOR')
if ident is None:
ident = request.META.get('REMOTE_ADDR')
else:
ident = ''.join(ident.split())
return self.cache_format % {
'scope': self.scope,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment