mirror of
https://github.com/go-task/task.git
synced 2025-12-16 19:57:43 +01:00
refactor
This commit is contained in:
@@ -38,7 +38,7 @@ func buildHTTPClient(insecure bool, caCert, cert, certKey string) (*http.Client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
tlsConfig := &tls.Config{
|
tlsConfig := &tls.Config{
|
||||||
InsecureSkipVerify: insecure, //nolint:gosec
|
InsecureSkipVerify: insecure,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load custom CA certificate if provided
|
// Load custom CA certificate if provided
|
||||||
@@ -84,8 +84,7 @@ func NewHTTPNode(
|
|||||||
if url.Scheme == "http" && !insecure {
|
if url.Scheme == "http" && !insecure {
|
||||||
return nil, &errors.TaskfileNotSecureError{URI: url.Redacted()}
|
return nil, &errors.TaskfileNotSecureError{URI: url.Redacted()}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build HTTP client with TLS configuration from node options
|
|
||||||
client, err := buildHTTPClient(insecure, base.caCert, base.cert, base.certKey)
|
client, err := buildHTTPClient(insecure, base.caCert, base.cert, base.certKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user