fix(config): replace hostname in error string if opted (#262)

This commit is contained in:
Shashank D
2022-03-16 05:47:57 +05:30
committed by GitHub
parent 8970ad5ad5
commit fdec317df0

View File

@ -197,6 +197,9 @@ func (endpoint *Endpoint) EvaluateHealth() *Result {
result.body = nil
// Clean up parameters that we don't need to keep in the results
if endpoint.UIConfig.HideHostname {
for errIdx, errorString := range result.Errors {
result.Errors[errIdx] = strings.ReplaceAll(errorString, result.Hostname, "host")
}
result.Hostname = ""
}
return result