Use pointer based TLS field (#13659)

This will help other projects like `health-analyzer` to verify that the
struct was indeed populated by the minio server, and is not
default-populated during unmarshalling of the JSON.

Signed-off-by: Shireesh Anjal <shireesh@minio.io>
This commit is contained in:
Shireesh Anjal
2021-11-18 22:32:33 +05:30
committed by GitHub
parent 886262e58a
commit 7152915318
3 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -1835,6 +1835,7 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque
})
}
tls := getTLSInfo()
healthInfo.Minio.Info = madmin.MinioInfo{
Mode: infoMessage.Mode,
Domain: infoMessage.Domain,
@@ -1847,7 +1848,7 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque
Services: infoMessage.Services,
Backend: infoMessage.Backend,
Servers: servers,
TLS: getTLSInfo(),
TLS: &tls,
}
partialWrite(healthInfo)
}