- Zero external dependencies - Only uses Go standard library
- Sensible defaults - Works out of the box
- Options pattern - Fully configurable when needed
- Concurrent safe - Safe for use across goroutines
Installation
Middlewares are included with Mizu. Import the specific middleware you need:Quick Start
A typical production setup:Categories
Authentication
Secure your endpoints with various authentication methods:Security
Protect your application from common web vulnerabilities:Rate Limiting & Resilience
Control request rates and protect against overload:Request Processing
Validate and transform incoming requests:Response Processing
Transform and enhance outgoing responses:Caching
Control HTTP caching behavior:URL Handling
Redirect and rewrite URLs:Networking & Proxy
Handle proxy headers and reverse proxying:Request Context
Enhance request handling:Real-time
Support real-time communication:Static Files
Serve static content:Operations & Monitoring
Tools for production operations:Advanced
Specialized functionality:Connection & Protocol
Connection and protocol handling:Internationalization
Locale and timezone handling:External Integrations
Third-party service integrations:Bot & Client Detection
Client identification and validation:Usage Patterns
Global middleware
Apply to all routes:Route-specific middleware
Apply to specific routes:Group middleware
Apply to a group of routes:Conditional middleware
Skip middleware based on conditions:Best Practices
- Order matters - Place
recoverfirst to catch all panics - Use timeouts - Always set request timeouts in production
- Rate limit - Protect public endpoints from abuse
- Security headers - Use
helmetfor recommended security headers - Request IDs - Add
requestidfor tracing and debugging
Next Steps
- Learn about writing custom middleware
- Explore individual middleware documentation in the sidebar