mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 22:15:13 +00:00
CDN
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user