middleware

package
v0.0.0-...-9df0f26 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Limiter = limiter.New(limiter.Config{
	Max: 100,
	LimitReached: func(ctx *fiber.Ctx) error {
		return ctx.Status(fiber.StatusTooManyRequests).Render("pages/error", map[string]any{
			"code":    fiber.StatusTooManyRequests,
			"message": "Too Many Requests, Please Try Again Later",
		})
	},
})

Functions

func CatchServerError

func CatchServerError(ctx *fiber.Ctx, err error) error

func CheckAuth

func CheckAuth(ctx *fiber.Ctx) error

func SetRealIpClient

func SetRealIpClient(ctx *fiber.Ctx) error

SetRealIpClient TODO: It's Really work?

Types

This section is empty.

Jump to

Keyboard shortcuts

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