middleware

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ContextUserID ctxKey = "user_id"

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(authService *auth.Service, cookieName string) func(http.Handler) http.Handler

func CSRFMiddleware added in v1.0.4

func CSRFMiddleware(csrfConfig models.CSRFConfig) func(http.Handler) http.Handler

func CorsMiddleware

func CorsMiddleware(allowedOrigins []string) func(http.Handler) http.Handler

func EndpointHooksMiddleware added in v1.0.3

func EndpointHooksMiddleware(config *models.Config, authService *auth.Service) func(http.Handler) http.Handler

func OptionalAuthMiddleware

func OptionalAuthMiddleware(authService *auth.Service, cookieName string) func(http.Handler) http.Handler

func RateLimitMiddleware added in v1.0.4

func RateLimitMiddleware(rateLimitService models.RateLimitService) func(http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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