RELEASE 1.0! #5

Merged
IgorVolochay merged 95 commits from prebuild into main 2026-09-09 08:45:32 +00:00
Showing only changes of commit 7647579155 - Show all commits
+7
View File
@@ -38,10 +38,17 @@ class RequestLoggingMiddleware(BaseHTTPMiddleware):
duration_ms = round((time.perf_counter() - start) * 1000, 1)
status = response.status_code
client_ip = request.headers.get("X-Forwarded-For")
if client_ip:
client_ip = client_ip.split(",")[0].strip()
else:
client_ip = request.headers.get("X-Real-IP") or (request.client.host if request.client else "unknown")
base_fields = {
"method": request.method,
"path": request.url.path,
"query": str(request.query_params) or None,
"client_ip": client_ip,
"status": status,
"duration_ms": duration_ms,
}