Yes, @isao is right, you should write this routine by iterating over the methods defined by `Object.keys(req.app.routes)`, not need to use `methods`.