mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-31 21:19:55 +00:00
The MultiTransport's job is per-request dispatch between the embedded NetBird transport and the stdlib transport based on the direct_upstream context flag — about 25 lines of code. The header/body debug logging that was bundled in pulls in: - io.ReadAll on every request body, even when log level is above debug. Forces buffering of streaming POSTs (LLM completions, file uploads) before they reach the upstream transport. - A header redaction list and a body-snippet cap that duplicate concerns already covered by netbird.go's per-roundtrip log. netbird.go already emits method/host/url/account/duration/status/err at debug level on every roundtrip; nothing in the private-service feature needs the extra header+body dump. - Drop logUpstreamRequest, formatHeaders, redactHeaderValue, snapshotRequestBody, and the upstreamLogBodyMax constant. - Drop the logger field and the trailing nil arg from NewMultiTransport; proxy/server.go and the tests updated accordingly.