diff --git a/services/web/app/src/infrastructure/Modules.js b/services/web/app/src/infrastructure/Modules.js index 0157a4b852..43a81a0590 100644 --- a/services/web/app/src/infrastructure/Modules.js +++ b/services/web/app/src/infrastructure/Modules.js @@ -81,14 +81,6 @@ function loadViewIncludes(app) { } } -function registerAppMiddleware(app) { - for (const module of _modules) { - if (module.appMiddleware) { - module.appMiddleware(app) - } - } -} - function moduleIncludes(view, locals) { const compiledPartials = _viewIncludes[view] || [] let html = '' @@ -152,7 +144,6 @@ module.exports = { loadViewIncludes, moduleIncludes, moduleIncludesAvailable, - registerAppMiddleware, hooks: { attach: attachHook, fire: fireHook, diff --git a/services/web/app/src/infrastructure/Server.js b/services/web/app/src/infrastructure/Server.js index bf814d0d9f..61ba7cf355 100644 --- a/services/web/app/src/infrastructure/Server.js +++ b/services/web/app/src/infrastructure/Server.js @@ -132,7 +132,6 @@ app.set('views', Path.join(__dirname, '/../../views')) app.set('view engine', 'pug') Modules.loadViewIncludes(app) -Modules.registerAppMiddleware(app) app.use(bodyParser.urlencoded({ extended: true, limit: '2mb' })) app.use(bodyParser.json({ limit: Settings.max_json_request_size })) app.use(methodOverride())