diff --git a/client/transport.go b/client/transport.go index 22c26fb..bd38190 100644 --- a/client/transport.go +++ b/client/transport.go @@ -221,6 +221,10 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { sessionURL.String(), nil, ) + if userAgent := req.Header.Get("User-Agent"); userAgent != "" { + // copy the UA from the original request to the auth request + sessionReq.Header.Set("User-Agent", userAgent) + } if err != nil { return nil, fmt.Errorf("transport: creating session request: %w", err) }