Use this section when behavior belongs around route handlers rather than inside them: security headers, sessions, CSRF, static files, CORS, auth, and custom pipeline logic.
Overview
Protocol definition and pipeline execution
How middleware works -- no base class, no inheritance.
Built-in Middleware
CORS, StaticFiles, Sessions, Auth, CSRF
Middleware that ships with Chirp.
Custom Middleware
Writing your own middleware
Functions, classes, and real-world patterns.
RenderPlan Middleware
Inspect rendering decisions from middleware
Read-only access to the frozen RenderPlan for analytics, caching, and debugging.