Use client IP (potentially proxied) in logs, handle [ipv6].

This commit is contained in:
2026-04-24 20:13:11 +00:00
parent 0190bda853
commit abcf5d9940
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ async def log_access(req, res):
return res
start = getattr(req.ctx, "_log_start", None)
duration_ms = (time.perf_counter() - start) * 1000 if start is not None else 0.0
client = req.ip or "-"
client = req.client_ip or "-"
host = req.host or "-"
path = req.path
if req.query_string: