Uses of middleware in a web app

I’ve recently heard about “middleware” and can see that Symfony and Laravel implement these. In the context of a web app, what are the uses of middleware other than logging, caching, authentication and redirecting?

I would expect that the most common use is to generate a response based on the request.

Another aux function would be to deal with cross origin requests. Or perhaps even authorization in general.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.