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. 6
      cmd/gateway-startup-msg.go
  2. 6
      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)))
log.Println(colorBlue("\nBrowser Access:")) if globalIsBrowserEnabled {
log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr)) log.Println(colorBlue("\nBrowser Access:"))
log.Println(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 3), apiEndpointStr))
}
} }

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

Loading…
Cancel
Save