Add missing auth settings
Some checks failed
Default / Build (push) Failing after 1m37s
Default / Build UI (push) Failing after 24s
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Publish Github & APT release (push) Has been cancelled

This commit is contained in:
andig 2022-01-02 16:17:02 +01:00
parent 94b889707c
commit 159e0304c5

View file

@ -71,10 +71,17 @@ func NewHTTPProviderFromConfig(other map[string]interface{}) (IntProvider, error
WithHeaders(cc.Headers). WithHeaders(cc.Headers).
WithBody(cc.Body) WithBody(cc.Body)
pipe, err := pipeline.New(cc.Settings) http.Client.Timeout = cc.Timeout
var err error
if cc.Auth.Type != "" {
_, err = http.WithAuth(cc.Auth.Type, cc.Auth.User, cc.Auth.Password)
}
if err == nil { if err == nil {
var pipe *pipeline.Pipeline
pipe, err = pipeline.New(cc.Settings)
http = http.WithPipeline(pipe) http = http.WithPipeline(pipe)
http.Client.Timeout = cc.Timeout
} }
return http, err return http, err