diff --git a/app/controllers/generic_controller.js b/app/controllers/generic_controller.js index b0548c9b..7bf7d8c4 100644 --- a/app/controllers/generic_controller.js +++ b/app/controllers/generic_controller.js @@ -2,6 +2,12 @@ module.exports = class GenericController { route (app) { - app.options('*', (req, res) => res.end()); + app.options('*', emptyResponse()); } }; + +function emptyResponse () { + return function emptyResponseMiddleware (req, res) { + res.end(); + }; +}