middlewares

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger(logger logger.Logger) fiber.Handler

AccessLogger middleware

func CSRFMiddleware

func CSRFMiddleware(session session.Session) fiber.Handler

CSRFMiddleware protection middleware

func GetCSRFKey

func GetCSRFKey(session session.Session) string

CSRFMiddleware

func GetCookieSession

func GetCookieSession(ctx *fiber.Ctx) session.Session

GetCookieSession get session driver from context

func GetHeaderSession

func GetHeaderSession(ctx *fiber.Ctx) session.Session

GetHeaderSession get session driver from context

func JSONOnly

func JSONOnly(ctx *fiber.Ctx) error

JSONOnly implement

func Maintenance

func Maintenance(c cache.Cache) fiber.Handler

Maintenance middleware

func NewCookieSession

func NewCookieSession(cache cache.Cache, secure bool, domain string, sameSite string, exp time.Duration) fiber.Handler

NewCookieSession create new cookie based session

func NewHeaderSession

func NewHeaderSession(cache cache.Cache, exp time.Duration) fiber.Handler

NewHeaderSession create new header based session

func RateLimiter

func RateLimiter(key string, maxAttempts uint32, ttl time.Duration, c cache.Cache) fiber.Handler

RateLimiter middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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