mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 04:23:15 -05:00
Operators could not tell which client sends requests that are refused with 401. Add --log-client (LOCALAI_LOG_CLIENT, off by default). When set, the HTTP request log line also carries duration, remote, user_agent and, when present, request_id. The address is the TCP peer. It is never read from X-Forwarded-For, X-Real-Ip or Forwarded, because LocalAI has no trusted-proxy setting and any client can forge those headers. Behind a reverse proxy the value is the proxy address. Authorization headers, cookies, query strings and bodies are never logged. User agent and request id are cut to a fixed length and have control characters replaced. Assisted-by: Claude:claude-sonnet-5-5 go gofmt