fix: disable rate limiter (need to be configured properly)

This commit is contained in:
Yanislav Igonin 2022-04-09 15:42:56 +03:00
parent c8c9850625
commit 84cd830a7f

View File

@ -9,10 +9,11 @@ import (
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress" "github.com/gofiber/fiber/v2/middleware/compress"
"github.com/gofiber/fiber/v2/middleware/etag" "github.com/gofiber/fiber/v2/middleware/etag"
"github.com/gofiber/fiber/v2/middleware/limiter"
"github.com/gofiber/fiber/v2/middleware/recover" "github.com/gofiber/fiber/v2/middleware/recover"
"github.com/gofiber/template/html" "github.com/gofiber/template/html"
// "github.com/gofiber/fiber/v2/middleware/limiter"
"micrach/build" "micrach/build"
"micrach/config" "micrach/config"
"micrach/controllers" "micrach/controllers"
@ -49,9 +50,9 @@ func main() {
app := fiber.New(fiber.Config{Views: engine}) app := fiber.New(fiber.Config{Views: engine})
app.Use(recover.New()) app.Use(recover.New())
app.Use(limiter.New(limiter.Config{ // app.Use(limiter.New(limiter.Config{
Next: func(c *fiber.Ctx) bool { return c.IsFromLocal() }, // Next: func(c *fiber.Ctx) bool { return c.IsFromLocal() },
})) // }))
app.Use(compress.New()) app.Use(compress.New())
app.Use(etag.New()) app.Use(etag.New())