diff --git a/proxy/internal/roundtrip/netbird.go b/proxy/internal/roundtrip/netbird.go index a948830c6..de907e397 100644 --- a/proxy/internal/roundtrip/netbird.go +++ b/proxy/internal/roundtrip/netbird.go @@ -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