about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--server.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.go b/server.go
index c588efb..dc8ea7b 100644
--- a/server.go
+++ b/server.go
@@ -20,6 +20,7 @@ import (
 	"github.com/gofiber/fiber/v2/middleware/healthcheck"
 	"github.com/gofiber/fiber/v2/middleware/logger"
 	"github.com/gofiber/fiber/v2/middleware/recover"
+	"github.com/gofiber/fiber/v2/middleware/skip"
 
 	"github.com/shengyanli1982/law"
 )
@@ -120,9 +121,11 @@ func main() {
 	toplevel.Get("/health", func(c *fiber.Ctx) error {
 		return c.SendStatus(fiber.StatusOK)
 	})
-	toplevel.Use(logger.New(logger.Config{
+	toplevel.Use(skip.New(logger.New(logger.Config{
 		Output: law.NewWriteAsyncer(os.Stdout, nil),
 		Format: "${protocol} ${method} ${status} ${host} ${url} ${respHeader:Location}\n",
+	}), func(c *fiber.Ctx) bool {
+		return c.Hostname() != "fly-internal"
 	}))
 	toplevel.Use(func(c *fiber.Ctx) error {
 		host := hosts[c.Hostname()]