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
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:
parent
94b889707c
commit
159e0304c5
1 changed files with 9 additions and 2 deletions
|
|
@ -71,10 +71,17 @@ func NewHTTPProviderFromConfig(other map[string]interface{}) (IntProvider, error
|
|||
WithHeaders(cc.Headers).
|
||||
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 {
|
||||
var pipe *pipeline.Pipeline
|
||||
pipe, err = pipeline.New(cc.Settings)
|
||||
http = http.WithPipeline(pipe)
|
||||
http.Client.Timeout = cc.Timeout
|
||||
}
|
||||
|
||||
return http, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue