From 6f7c6fc560d148c45f21a97193ef86b5e1a0bec5 Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Wed, 3 Jan 2018 21:30:52 -0800 Subject: [PATCH] Honor browser enabled config value in startup message (#5313) Currently, browser access information is displayed without checking if browser enabled flag is turned off in config.json. Fixing it to hide the information if the flag is turned off. Fixes #5312 --- cmd/gateway-startup-msg.go | 6 ++++-- cmd/server-startup-msg.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/gateway-startup-msg.go b/cmd/gateway-startup-msg.go index 4ad3d4330..3029c7318 100644 --- a/cmd/gateway-startup-msg.go +++ b/cmd/gateway-startup-msg.go @@ -53,6 +53,8 @@ func printGatewayCommonMsg(apiEndpoints []string) { log.Println(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKey))) log.Println(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", cred.SecretKey))) - log.Println(colorBlue("\nBrowser Access:")) - log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) + if globalIsBrowserEnabled { + log.Println(colorBlue("\nBrowser Access:")) + log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) + } } diff --git a/cmd/server-startup-msg.go b/cmd/server-startup-msg.go index e5da23b0c..554b42eee 100644 --- a/cmd/server-startup-msg.go +++ b/cmd/server-startup-msg.go @@ -121,8 +121,10 @@ func printServerCommonMsg(apiEndpoints []string) { } printEventNotifiers() - log.Println(colorBlue("\nBrowser Access:")) - log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) + if globalIsBrowserEnabled { + log.Println(colorBlue("\nBrowser Access:")) + log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) + } } // Prints bucket notification configurations.