Skip to main content

Module middleware

Module middleware 

Source
Expand description

API Middleware

Authentication, authorization, rate limiting, and other middleware

Functionsยง

check_permission
Check whether auth_token carries the given permission.
check_role
Check whether auth_token carries the given role.
logging_middleware
Log every incoming HTTP request with method, URI, client IP, and user-agent.
rate_limit_middleware_with_state
Rate limiting middleware backed by crate::distributed::rate_limiting::DistributedRateLimiter.
security_headers_middleware
Security headers middleware
timeout_middleware
Request timeout middleware