Skip to content
Latchkey

Middleware - CI/CD Glossary Definition

Middleware is pipeline code that runs around a request handler to manage cross-cutting concerns.

Middleware is code that runs in the request pipeline before or after the main handler, handling concerns like auth, logging, and CORS. CI tests verify middleware behavior such as rejecting unauthenticated requests.

Middleware chains handle auth, parsing, and logging so handlers stay focused. Tests assert that, for example, the auth middleware returns 401 when a token is missing.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →