Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
CVanF5 committed Sep 19, 2024
1 parent ba506e5 commit 23d810f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func handleSelfSignedCertificates(col *Collector) error {
}

func processOtlpReceivers(tlsConfig *OtlpTLSConfig) error {
sanNames := []string{"127.0.0.1", "::1", "localhost"}
sanNames := strings.Split(DefCollectorTLSSANNames, ",")

if tlsConfig.Ca == "" {
tlsConfig.Ca = DefCollectorTLSCAPath
Expand Down
1 change: 1 addition & 0 deletions internal/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
DefCollectorTLSCertPath = "/var/lib/nginx-agent/cert.pem"
DefCollectorTLSKeyPath = "/var/lib/nginx-agent/key.pem"
DefCollectorTLSCAPath = "/var/lib/nginx-agent/ca.pem"
DefCollectorTLSSANNames = "127.0.0.1, ::1, localhost"

DefCommandServerHostKey = ""
DefCommandServerPortKey = 0
Expand Down

0 comments on commit 23d810f

Please sign in to comment.