This commit is contained in:
2026-09-10 13:49:36 -05:00
parent 7a5894d9cb
commit 768f44f669
8 changed files with 13805 additions and 14 deletions
+6
View File
@@ -32,6 +32,7 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/adaptor"
"github.com/gofiber/fiber/v2/middleware/compress"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/prometheus/client_golang/prometheus/promhttp"
fiberswagger "github.com/swaggo/fiber-swagger"
@@ -100,6 +101,11 @@ func main() {
// — CORS Allow ALL origins (development) —
app.Use(cors.New())
// — Global Brotli/Gzip Compression (shrinks transatlantic payload bytes by 70-85%) —
app.Use(compress.New(compress.Config{
Level: compress.LevelBestSpeed,
}))
// Middlewares
app.Use(middleware.StructuredLogger())
app.Use(middleware.RateLimiter())