Skip to content

Commit

Permalink
apitest: fixed using base authenticated URL for server
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrode committed Mar 24, 2021
1 parent 086b765 commit 738705f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/lib/api/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func (request Request) buildHttpRequest() (req *http.Request, err error) {
if err != nil {
return req, fmt.Errorf("error executing buildpolicy: %s", err)
}

req, err = http.NewRequest(request.Method, requestUrl, body)
if err != nil {
return req, fmt.Errorf("error creating new request")
Expand All @@ -101,6 +102,7 @@ func (request Request) buildHttpRequest() (req *http.Request, err error) {
if ok {
req.SetBasicAuth(reqUrl.User.Username(), pw)
}
req.URL.User = nil
}

q := req.URL.Query()
Expand Down

0 comments on commit 738705f

Please sign in to comment.