Skip to main content

Module middleware

Module middleware 

Source

Functions§

auth
Bearer token auth middleware. If config.api_key is non-empty, validates Authorization: Bearer <key>. If api_key is empty, all requests are allowed through.
cors_layer
new_rate_limit_map
rate_limit
Per-IP rate limiting middleware. If config.server.rate_limit_seconds > 0, rejects requests that come faster than the configured interval with 429 Too Many Requests.
request_id

Type Aliases§

RateLimitMap