mirror of
https://github.com/yanislav-igonin/micrach
synced 2025-04-20 03:40:33 +03:00
lint
This commit is contained in:
parent
34c144b571
commit
7dedbf1d98
12
main.go
12
main.go
@ -56,17 +56,15 @@ func main() {
|
|||||||
engine := html.New("./templates", ".html")
|
engine := html.New("./templates", ".html")
|
||||||
engine.AddFunc("Iterate", templates.Iterate)
|
engine.AddFunc("Iterate", templates.Iterate)
|
||||||
engine.AddFunc("NotNil", templates.NotNil)
|
engine.AddFunc("NotNil", templates.NotNil)
|
||||||
app := fiber.New(fiber.Config{
|
|
||||||
Views: engine,
|
app := fiber.New(fiber.Config{Views: engine})
|
||||||
})
|
|
||||||
app.Use(limiter.New(limiter.Config{
|
app.Use(limiter.New(limiter.Config{
|
||||||
// skip on localhost
|
Next: func(c *fiber.Ctx) bool { return c.IP() == "127.0.0.1" },
|
||||||
Next: func(c *fiber.Ctx) bool {
|
|
||||||
return c.IP() == "127.0.0.1"
|
|
||||||
},
|
|
||||||
}))
|
}))
|
||||||
app.Use(compress.New())
|
app.Use(compress.New())
|
||||||
app.Use(etag.New())
|
app.Use(etag.New())
|
||||||
|
|
||||||
app.Static("/uploads", "./uploads")
|
app.Static("/uploads", "./uploads")
|
||||||
app.Static("/static", "./static")
|
app.Static("/static", "./static")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user