1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-20 22:33:09 +00:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init
2022-05-31 17:35:49 +03:00
..
🎉 v3: init
2022-05-31 17:35:49 +03:00
🎉 v3: init
2022-05-31 17:35:49 +03:00

Skip

Skip middleware for Fiber that skips a wrapped handler is a predicate is true.

Table of Contents

Signatures

func New(handler fiber.Handler, exclude func(c *fiber.Ctx) bool) fiber.Handler

Examples

Import the middleware package that is part of the Fiber web framework

import (
  "github.com/gofiber/fiber/v2"
  "github.com/gofiber/fiber/v2/middleware/skip"
)

After you initiate your Fiber app, you can use the following possibilities:

app.Use(skip.New(handler, func(ctx *fiber.Ctx) bool { return ctx.Method() == fiber.MethodOptions }))