🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Web Development Intermediate

What is Middleware?

Software that sits between the request and response in a web application, performing processing like authentication or logging.

Middleware functions form a pipeline that processes HTTP requests and responses. Each middleware can inspect, modify, or reject requests before passing them to the next handler. Common middleware handles authentication, CORS, compression, rate limiting, and logging.

In Express.js, middleware uses next() to pass control. In Laravel, middleware classes handle the request pipeline. The order of middleware execution matters — authentication should run before authorization, for example.

Related Terms

JSON Schema
A vocabulary for validating the structure and content of JSON data, ensuring API requests and responses conform to expected formats.
Sitemap XML
An XML file that lists all important URLs on a website, helping search engines discover and crawl content efficiently.
SEO (Search Engine Optimization)
The practice of optimizing websites to rank higher in search engine results, increasing organic traffic.
Server-Sent Events (SSE)
A web technology enabling servers to push real-time updates to browsers over a single HTTP connection, simpler than WebSockets.
API Rate Limiting
A strategy for limiting the number of API requests a client can make within a specified time window to protect server resources.
OAuth Scope
A mechanism in OAuth that limits an application's access to a user's account to specific resources or actions.
View All Web Development Terms →