We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93187f3 commit 18a229aCopy full SHA for 18a229a
1 file changed
main.go
@@ -7,6 +7,7 @@ import (
7
"github.com/ansrivas/fiberprometheus/v2"
8
"github.com/caarlos0/env/v6"
9
"github.com/gofiber/fiber/v2"
10
+ "github.com/gofiber/fiber/v2/middleware/cors"
11
"github.com/gofiber/fiber/v2/middleware/recover"
12
"github.com/italia/publiccode-validator-api/internal/common"
13
"github.com/italia/publiccode-validator-api/internal/handlers"
@@ -43,6 +44,8 @@ func Setup() *fiber.App {
43
44
// Automatically recover panics in handlers
45
app.Use(recover.New())
46
47
+ app.Use(cors.New())
48
+
49
prometheus := fiberprometheus.New(os.Args[0])
50
prometheus.RegisterAt(app, "/metrics")
51
app.Use(prometheus.Middleware)
0 commit comments