From bb86e71e6559963a8f562abedef650d9e4265390 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 6 Dec 2024 10:25:43 -0600 Subject: [PATCH] fix auth remote addr access (#15378) --- frigate/api/auth.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frigate/api/auth.py b/frigate/api/auth.py index cb5497f98..8f0fead85 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -85,7 +85,12 @@ def get_remote_addr(request: Request): return str(ip) # if there wasn't anything in the route, just return the default - return request.remote_addr or "127.0.0.1" + remote_addr = None + + if hasattr(request, "remote_addr"): + remote_addr = request.remote_addr + + return remote_addr or "127.0.0.1" def get_jwt_secret() -> str: