From 7210ae3701bcdd871d6369012b4934e78394e0d2 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Mon, 29 Jan 2024 16:02:08 +0000 Subject: [PATCH] Don't bother storing client IPs Since requests proxy via hungry the IP is masked already. Responsibility for tracking this is no longer with synapse. --- synapse/api/auth/internal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/api/auth/internal.py b/synapse/api/auth/internal.py index 36ee9c8b8fc8..d0894e4464ea 100644 --- a/synapse/api/auth/internal.py +++ b/synapse/api/auth/internal.py @@ -115,7 +115,10 @@ async def _wrapped_get_user_by_req( Once get_user_by_req has set up the opentracing span, this does the actual work. """ try: - ip_addr = request.get_client_ip_if_available() + # Beep: don't care about client IPs in synapse since hungry proxies (so IP is hungry) + ip_addr = "" + # ip_addr = request.get_client_ip_if_available() + user_agent = get_request_user_agent(request) access_token = self.get_access_token_from_request(request)