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
master
kannappanr 7 years ago committed by Nitish Tiwari
parent c0721164be
commit 6f7c6fc560
  1. 2
      cmd/gateway-startup-msg.go
  2. 2
      cmd/server-startup-msg.go

@ -53,6 +53,8 @@ func printGatewayCommonMsg(apiEndpoints []string) {
log.Println(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKey))) log.Println(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKey)))
log.Println(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", cred.SecretKey))) log.Println(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", cred.SecretKey)))
if globalIsBrowserEnabled {
log.Println(colorBlue("\nBrowser Access:")) log.Println(colorBlue("\nBrowser Access:"))
log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr))
} }
}

@ -121,9 +121,11 @@ func printServerCommonMsg(apiEndpoints []string) {
} }
printEventNotifiers() printEventNotifiers()
if globalIsBrowserEnabled {
log.Println(colorBlue("\nBrowser Access:")) log.Println(colorBlue("\nBrowser Access:"))
log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr))
} }
}
// Prints bucket notification configurations. // Prints bucket notification configurations.
func printEventNotifiers() { func printEventNotifiers() {

Loading…
Cancel
Save