Skip to content

Commit ee05a5e

Browse files
committed
Fix based on review
1 parent dc7f376 commit ee05a5e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/cmd/push.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ type authTransport struct {
103103

104104
func (t *authTransport) RoundTrip(req *http.Request) (*http.Response, error) {
105105
if t.token != "" {
106-
// Use Bearer auth directly
106+
// Clone request to avoid modifying the original (RoundTripper contract)
107+
req = req.Clone(req.Context())
107108
req.Header.Set("Authorization", "Bearer "+t.token)
108109
}
109110
return t.base.RoundTrip(req)

0 commit comments

Comments
 (0)