mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 05:44:10 -04:00
Kill off HomeServer.get_ip_from_request()
(#9080)
Homeserver.get_ip_from_request() used to be a bit more complicated, but now it is totally redundant. Let's get rid of it.
This commit is contained in:
parent
2ec8ca5e60
commit
0f8945e166
9 changed files with 15 additions and 52 deletions
|
@ -187,7 +187,7 @@ class Auth:
|
|||
AuthError if access is denied for the user in the access token
|
||||
"""
|
||||
try:
|
||||
ip_addr = self.hs.get_ip_from_request(request)
|
||||
ip_addr = request.getClientIP()
|
||||
user_agent = get_request_user_agent(request)
|
||||
|
||||
access_token = self.get_access_token_from_request(request)
|
||||
|
@ -276,7 +276,7 @@ class Auth:
|
|||
return None, None
|
||||
|
||||
if app_service.ip_range_whitelist:
|
||||
ip_address = IPAddress(self.hs.get_ip_from_request(request))
|
||||
ip_address = IPAddress(request.getClientIP())
|
||||
if ip_address not in app_service.ip_range_whitelist:
|
||||
return None, None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue