diff --git a/src/routes/helpers.js b/src/routes/helpers.js index 3f3ff06472..fd466c78f1 100644 --- a/src/routes/helpers.js +++ b/src/routes/helpers.js @@ -3,7 +3,7 @@ var helpers = {}; helpers.setupPageRoute = function (router, name, middleware, middlewares, controller) { - middlewares = middlewares.concat([middleware.registrationComplete, middleware.pageView, middleware.pluginHooks]); + middlewares = [middleware.registrationComplete, middleware.pageView, middleware.pluginHooks].concat(middlewares); router.get(name, middleware.busyCheck, middleware.buildHeader, middlewares, controller); router.get('/api' + name, middlewares, controller);