From ba695134cef022743b78e43403b765cc1a16a409 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Wed, 15 Nov 2017 21:35:35 +0200 Subject: [PATCH] Make cors messages respect the debug flag (#25) --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6ba677b..c521d56 100644 --- a/main.go +++ b/main.go @@ -61,8 +61,10 @@ func startHTTPAPI() { OptionsPassthrough: false, Debug: Config.General.Debug, }) - // Logwriter for saner log output - c.Log = stdlog.New(logwriter, "", 0) + if Config.General.Debug { + // Logwriter for saner log output + c.Log = stdlog.New(logwriter, "", 0) + } api.POST("/register", webRegisterPost) api.POST("/update", Auth(webUpdatePost))