mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +03:00
Add source documentation.
This commit is contained in:
parent
a1b4695cf8
commit
129cf80f5e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user