Skip to content

Commit

Permalink
fix: panic using basic auth (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitriy Agafonov <[email protected]>
  • Loading branch information
skysilver-lab and Dmitriy Agafonov authored Apr 12, 2023
1 parent 39c3e85 commit 2be922e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type BasicAuth struct {
}

func (a BasicAuth) Apply(r *http.Request) error {
if r.Header == nil {
r.Header = make(http.Header)
}
r.SetBasicAuth(a.username, a.password)
return nil
}
Expand Down

0 comments on commit 2be922e

Please sign in to comment.