Skip to content

Middlewareλ︎

Apply common transformations to request and or response hash-maps, such as security tokens, cookie management, session and access management, presentation templates, etc.

Middleware is implemented by Clojure functions that receive a handler as an argument and return a handler as a result.

Middleware in Ringλ︎

Middleware can wrap handlers or other middleware, affecting their behavior.

For example the wrap-reload middleware enables live reloading by detecting file changes and reloading affected functions into their namespace, before the request is passed to the relevant handler function

Middleware provided by Ring includes:

In ring/ring-core:

In ring/ring-devel: