mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 16:24:18 +03:00
Refs #148
This commit is contained in:
parent
9746bb34cc
commit
50c359c551
|
@ -188,7 +188,7 @@ class PerUserThrottling(BaseThrottle):
|
||||||
|
|
||||||
def get_cache_key(self):
|
def get_cache_key(self):
|
||||||
if self.auth.is_authenticated():
|
if self.auth.is_authenticated():
|
||||||
ident = unicode(self.auth)
|
ident = self.auth.id
|
||||||
else:
|
else:
|
||||||
ident = self.view.request.META.get('REMOTE_ADDR', None)
|
ident = self.view.request.META.get('REMOTE_ADDR', None)
|
||||||
return 'throttle_user_%s' % ident
|
return 'throttle_user_%s' % ident
|
||||||
|
|
Loading…
Reference in New Issue
Block a user