From fa98014bbe54a980cfb06676554968e0a1a60208 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Tue, 20 Jul 2021 03:46:26 +0530 Subject: [PATCH] fix: hostname inside --console-address not anonymized (#12743) In case of non-distributed setup, if the server start command contains a `--console-address` flag and its value contains a hostname, it is not getting anonymized. Fixed by replacing the console host also with `server1` --- cmd/admin-handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 34a38bcde..7fb9e96e9 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1655,7 +1655,8 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque anonymizeCmdLine := func(cmdLine string) string { if !globalIsDistErasure { // FS mode - single server - hard code to `server1` - return strings.Replace(cmdLine, globalLocalNodeName, "server1", -1) + anonCmdLine := strings.Replace(cmdLine, globalLocalNodeName, "server1", -1) + return strings.Replace(anonCmdLine, globalMinioConsoleHost, "server1", -1) } // Server start command regex groups: