From ca2c8973407b6c83981a92299660dddaec4bbeec Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 15 Jan 2020 17:48:46 -0500 Subject: [PATCH] Add flag to disable startup banner --- conf/configuration.go | 1 + server/app.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/configuration.go b/conf/configuration.go index c82af17a0..11e26bd28 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -27,6 +27,7 @@ type sonic struct { LogLevel string `default:"info"` DevDisableAuthentication bool `default:"false"` DevDisableFileCheck bool `default:"false"` + DevDisableBanner bool `default:"false"` } var Sonic *sonic diff --git a/server/app.go b/server/app.go index 8cff24d0c..d8408e5f7 100644 --- a/server/app.go +++ b/server/app.go @@ -24,7 +24,9 @@ type Server struct { func New(importer *scanner_legacy.Importer) *Server { a := &Server{Importer: importer} - showBanner(Version) + if !conf.Sonic.DevDisableBanner { + showBanner(Version) + } initMimeTypes() a.initRoutes() a.initImporter()