middleware

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware fiber.Handler

func WithContextLog

func WithContextLog() Middleware

func WithIPAllowList

func WithIPAllowList(allowlist []string) Middleware

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() Middleware

WithRecover is the middleware that recovers from panics.

func WithRequestLog

func WithRequestLog() Middleware

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.

Jump to

Keyboard shortcuts

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