From 7dedbf1d98fc1a4e79cfb163371e20d8fec0e1a2 Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Wed, 6 Apr 2022 12:52:34 +0300 Subject: [PATCH] lint --- main.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 6902d7c..95f93bf 100644 --- a/main.go +++ b/main.go @@ -56,17 +56,15 @@ func main() { engine := html.New("./templates", ".html") engine.AddFunc("Iterate", templates.Iterate) 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{ - // 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(etag.New()) + app.Static("/uploads", "./uploads") app.Static("/static", "./static")