add roundtripper debug log

This commit is contained in:
Alisdair MacLeod
2026-01-29 12:03:14 +00:00
parent 760ac5e07d
commit 7d74904d62

View File

@@ -8,6 +8,7 @@ import (
"time"
"github.com/netbirdio/netbird/client/embed"
log "github.com/sirupsen/logrus"
)
const deviceNamePrefix = "ingress-"
@@ -74,6 +75,13 @@ func (n *NetBird) RoundTrip(req *http.Request) (*http.Response, error) {
return nil, fmt.Errorf("no peer connection found for host: %s", req.Host)
}
log.WithFields(log.Fields{
"host": req.Host,
"url": req.URL.String(),
"requestURI": req.RequestURI,
"method": req.Method,
}).Debug("running roundtrip for peer connection")
// Create a new transport using the client dialer and perform the roundtrip.
// We do this instead of using the client HTTPClient to avoid issues around
// client request validation that do not work with the reverse proxied