Skip to content

NVR with realtime local object detection for IP cameras

Fix IPv6 addresses with IPv4 trusted proxies (#19134)

Nicholas Cook4b72c86e77ce
diff --git a/frigate/api/auth.py b/frigate/api/auth.py
index 6577f9c23e..9459c4ac88 100644
--- a/frigate/api/auth.py
+++ b/frigate/api/auth.py
@@ -71,7 +71,7 @@ def get_remote_addr(request: Request):
)
if trusted_proxy.version == 4:
ipv4 = ip.ipv4_mapped if ip.version == 6 else ip
- if ipv4 in trusted_proxy:
+ if ipv4 is not None and ipv4 in trusted_proxy:
trusted = True
logger.debug(f"Trusted: {str(ip)} by {str(trusted_proxy)}")
break