Expand description
HTTP Middleware for IPFRS Gateway
Provides:
- Authentication and authorization middleware using JWT tokens and API keys
- CORS middleware for cross-origin requests
- Rate limiting middleware for DoS prevention
- Compression middleware for bandwidth optimization
- Caching middleware for HTTP caching headers
Structs§
- Auth
Middleware Error - Middleware error wrapper
- Auth
User - Authenticated user context
- Cache
Config - Cache configuration
- Compression
Config - Compression configuration
- Cors
Config - CORS configuration
- Cors
State - CORS middleware state
- Rate
Limit Config - Rate limiter configuration
- Rate
Limit State - Rate limiter state (per-IP buckets)
- Validation
Config - Request validation configuration
- Validation
State - Validation middleware state
Enums§
- Compression
Level - Compression level - balances speed vs compression ratio
- Rate
Limit Error - Rate limit error
- Validation
Error - Validation error types
Functions§
- add_
caching_ headers - Add caching headers to a response for a given CID
- auth_
middleware - Authentication middleware
- check_
etag_ match - Check if request has a matching ETag (for conditional requests)
- cors_
middleware - CORS middleware
- not_
modified_ response - Build a 304 Not Modified response
- rate_
limit_ middleware - Rate limiting middleware
- require_
permission - Authorization middleware factory
- validate_
batch_ size - Validate batch size
- validate_
cid - Validate CID format
- validate_
content_ type - Validate content type
- validation_
middleware - Request validation middleware