Middleware

A function that runs before every route handler: security headers, language, cache control. Order matters, and a middleware that forgets to call `next()` stops the request silently.

Back to the glossary