diff --git a/src/main.go b/src/main.go index 0f16cf2..33a8740 100644 --- a/src/main.go +++ b/src/main.go @@ -44,13 +44,14 @@ func init() { log.Println("Successfully retrieved EULA blocked servers") app.Use(recover.New()) - app.Use(cors.New(cors.Config{ - AllowOrigins: "*", - AllowMethods: "HEAD,OPTIONS,GET", - ExposeHeaders: "Content-Type,X-Cache-Time-Remaining", - })) if config.Environment == "development" { + app.Use(cors.New(cors.Config{ + AllowOrigins: "*", + AllowMethods: "HEAD,OPTIONS,GET", + ExposeHeaders: "Content-Type,X-Cache-Time-Remaining", + })) + app.Use(logger.New(logger.Config{ Format: "${time} ${ip}:${port} -> ${method} ${path} -> ${status}\n", TimeFormat: "2006/01/02 15:04:05",