feat: add recover middleware
All checks were successful
/ build-and-push-image (push) Successful in 1m15s
All checks were successful
/ build-and-push-image (push) Successful in 1m15s
This commit is contained in:
parent
70d446b067
commit
238b542aeb
|
@ -9,6 +9,7 @@ import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||||
|
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@ func main() {
|
||||||
DB.InitDB()
|
DB.InitDB()
|
||||||
|
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
app.Use(recover.New())
|
||||||
app.Use(logger.New())
|
app.Use(logger.New())
|
||||||
app.Use(cors.New(cors.Config{
|
app.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: "http://localhost:4321",
|
AllowOrigins: "http://localhost:4321",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user