Skip to content

Request Filter

Thiago Bustamante edited this page May 19, 2017 · 6 revisions

Add filters to the request pipeline. A Filter is a function that receives * the request and the response object and must return a boolean value to inform * it the given request should target the destination API or if it should be ignored. * * Example: * * module.exports = function (req, res) { * return true; * }; * * * Each filter must be defined on its own .js file (placed on middleware/filter folder) * and the fileName must match: .js. * * So, the above filter should be saved in a file called myFilter.js and configured as: * * filter:[ * {name: "myFilter"} * ] *

Clone this wiki locally