mirror of
https://github.com/TwiN/gatus.git
synced 2025-04-10 19:08:28 +02:00
fix(config): replace hostname in error string if opted (#262)
This commit is contained in:
parent
8970ad5ad5
commit
fdec317df0
@ -197,6 +197,9 @@ func (endpoint *Endpoint) EvaluateHealth() *Result {
|
|||||||
result.body = nil
|
result.body = nil
|
||||||
// Clean up parameters that we don't need to keep in the results
|
// Clean up parameters that we don't need to keep in the results
|
||||||
if endpoint.UIConfig.HideHostname {
|
if endpoint.UIConfig.HideHostname {
|
||||||
|
for errIdx, errorString := range result.Errors {
|
||||||
|
result.Errors[errIdx] = strings.ReplaceAll(errorString, result.Hostname, "host")
|
||||||
|
}
|
||||||
result.Hostname = ""
|
result.Hostname = ""
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user