diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/server/server.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 5c92139..269ed9e 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -204,11 +204,15 @@ func New(runtimeConfig *Config, log *log.Logger) (*Server, error) { loggingMux.Handle("/", mux) } - top.Handle("/", - serverHeaderHandler( - wrapHandlerWithLogging(loggingMux, log), - ), - ) + if runtimeConfig.Development { + top.Handle("/", + serverHeaderHandler( + wrapHandlerWithLogging(loggingMux, log), + ), + ) + } else { + top.Handle("/", serverHeaderHandler(loggingMux)) + } top.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNoContent) |