Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
  • Loading branch information
coleenquadros committed Jan 17, 2024
1 parent 2547476 commit a4aec0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collectors/metrics/pkg/metricsclient/metricsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,14 @@ func MTLSTransport(logger log.Logger, caCertFile, tlsCrtFile, tlsKeyFile string)

caCertPool := x509.NewCertPool()
if os.Getenv("HTTPS_PROXY_CA_BUNDLE") != "" {
logger.Log(logger, logger.Log("Coleen", "custom ca", "ca bundle", os.Getenv("HTTPS_PROXY_CA_BUNDLE")))
caParsedCert, err := x509.ParseCertificate(caCert)
if err != nil {
return nil, fmt.Errorf("failed to parse server ca cert: %w", err)
}
caCertPool.AddCert(caParsedCert)
} else {
logger.Log(logger, logger.Log("Coleen", "no customCA ", "ca bundle", os.Getenv("HTTPS_PROXY_CA_BUNDLE")))
caCertPool.AppendCertsFromPEM(caCert)
}
// Setup HTTPS client
Expand Down

0 comments on commit a4aec0d

Please sign in to comment.