mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-22 23:02:22 +01: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
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user