Skip to content

Commit

Permalink
Merge pull request #153 from ddosify/develop
Browse files Browse the repository at this point in the history
Fix: Basic auth always set
  • Loading branch information
fatihbaltaci authored Mar 19, 2023
2 parents 66e4bc3 + 0ac85ea commit c4543b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/scenario/requester/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ func (h *HttpRequester) prepareReq(envs map[string]interface{}, trace *httptrace
return nil, err
}
}
httpReq.SetBasicAuth(username, password)
if username != "" && password != "" {
httpReq.SetBasicAuth(username, password)
}

httpReq = httpReq.WithContext(httptrace.WithClientTrace(httpReq.Context(), trace))
return httpReq, nil
Expand Down

0 comments on commit c4543b2

Please sign in to comment.