diff --git a/config/lib/express.js b/config/lib/express.js index 0f3c8b947c..53ca6418c9 100644 --- a/config/lib/express.js +++ b/config/lib/express.js @@ -228,6 +228,12 @@ module.exports.init = function (db) { // Initialize Express view engine this.initViewEngine(app); + + // Initialize Helmet security headers + this.initHelmetHeaders(app); + + // Initialize modules static client routes, before session! + this.initModulesClientRoutes(app); // Initialize Express session this.initSession(app, db); @@ -235,12 +241,6 @@ module.exports.init = function (db) { // Initialize Modules configuration this.initModulesConfiguration(app); - // Initialize Helmet security headers - this.initHelmetHeaders(app); - - // Initialize modules static client routes - this.initModulesClientRoutes(app); - // Initialize modules server authorization policies this.initModulesServerPolicies(app);