Filtering Requests with Middleware

Manikanta Panati · Apress eBooks · 2016

Middleware is a piece of code that hooks into Keystone.js’s request/response processing cycle. Middleware is available globally throughout the application for altering input or output and is generally considered code that is not specific to any domain. Examples of middleware include authentication and authorization, caching, performance monitoring, and content compression. While all of these features are critical, none are specific to any one kind of project, and therefore it is a good idea to separate these out from the project’s code in order to take advantage of them. In this chapter I’ll introduce you to the middleware included in Keystone.js and even show you how to write your own custom middleware solution. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik