middleware

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContextLog

func WithContextLog() fiber.Handler

func WithIPAllowList

func WithIPAllowList(allowlist []string) fiber.Handler

WithIPAllowList is the option that allowlist the IP. If the IP is in the allowlist, the request will be passed. Otherwise, the request will be dropped.

Example:

WithIPAllowList([]string{"192.168.1.0/24"})

func WithRecover

func WithRecover() fiber.Handler

WithRecover is the middleware that recovers from panics.

func WithRequestLog

func WithRequestLog(mask *mask.Mask) fiber.Handler

WithRequestLog is the middleware that logs the request. If you want to masked your request. You can configure it by setting on log agent. Some agent have feature like redaction rule to mask the request body.

Types

type Middleware

type Middleware fiber.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL