1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-02-04 14:41:45 +00:00

fix: Display "<redacted>" instead of "host" in errors (#262)

This commit is contained in:
TwiN
2022-03-15 20:51:59 -04:00
parent fdec317df0
commit bd4b91bbbd

View File

@@ -198,7 +198,7 @@ func (endpoint *Endpoint) EvaluateHealth() *Result {
// 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.Errors[errIdx] = strings.ReplaceAll(errorString, result.Hostname, "<redacted>")
}
result.Hostname = ""
}