Skip to content

ClientIPScopedRateThrottle ​

Overview ​

Count requests against the view's throttle_scope, per user when signed in and per client IP otherwise.

The client IP comes from the allauth account adapter's get_client_ip, the same address that allauth's own rate limits count. It trusts X-Forwarded-For only as far as ALLAUTH_TRUSTED_PROXY_COUNT or ALLAUTH_TRUSTED_CLIENT_IP_HEADER allow, so a caller cannot pick a new address on each request.

get_ident ​

Identify the machine making the request by parsing HTTP_X_FORWARDED_FOR if present and number of proxies is > 0. If not use all of HTTP_X_FORWARDED_FOR if it is available, if not use REMOTE_ADDR.

Signature ​

get_ident(self, request)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes

Source ​

server/vueda/user/throttles.py:24

Source ​

server/vueda/user/throttles.py:15