Add recover middleware
This commit is contained in:
parent
6c49dee732
commit
4a41e59d34
2
main.go
2
main.go
|
@ -9,6 +9,7 @@ import (
|
|||
"codeberg.org/video-prize-ranch/rimgo/views"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
||||
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||
"github.com/gofiber/template/handlebars"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -39,6 +40,7 @@ func main() {
|
|||
StreamRequestBody: true,
|
||||
})
|
||||
|
||||
app.Use(recover.New())
|
||||
app.Use("/static", filesystem.New(filesystem.Config{
|
||||
Root: http.FS(static.GetFiles()),
|
||||
}))
|
||||
|
|
Loading…
Reference in New Issue