DELAPARRA
Index
Color
NL
Category: Core glossary

Middleware

Explained by Updated

What is Middleware?

Middleware: Software that sits between two systems, intercepting and processing requests or responses. In web frameworks, middleware typically handles auth, logging, or request parsing. Middleware is code that sits between a request and the code that handles it. Each piece of middleware can inspect, change or stop the request, and do the same with the response on the way back.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Middleware

How is Middleware used in practice?

In web frameworks, middleware handles cross-cutting tasks: checking authentication, setting the language, limiting request rates, adding security headers and logging. Laravel applies middleware per route or group, so admin routes can require a login while public pages do not.

What should you keep in mind with Middleware?

Keep each middleware focused on one task, and think about the order. Authentication should run before anything that depends on the user; compression after the response is built. Middleware runs on every matching request, so keep it fast. A slow database query in global middleware slows down every page of the site.

At a glance

CategoryCore glossary
Explained by
Updated

More Core glossary terms

All terms starting with M

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.