Node.js based forum software built for the modern web
move static to end
barisusakli119d13053d51
diff --git a/src/middleware/index.js b/src/middleware/index.jsindex fb7bfc24fb..6c59c1709a 100644--- a/src/middleware/index.js+++ b/src/middleware/index.js@@ -204,10 +204,6 @@ module.exports = function(app, data) {compileTemplates(pluginTemplates);});- app.use(relativePath, express.static(path.join(__dirname, '../../', 'public'), {- maxAge: app.enabled('cache') ? 5184000000 : 0- }));-return middleware;};diff --git a/src/routes/index.js b/src/routes/index.jsindex cfba34a1f6..bea9e769dd 100644--- a/src/routes/index.js+++ b/src/routes/index.js@@ -1,6 +1,7 @@"use strict";var nconf = require('nconf'),+ path = require('path'),winston = require('winston'),controllers = require('./../controllers'),meta = require('./../meta'),@@ -187,7 +188,9 @@ module.exports = function(app, middleware) {groupRoutes(router, middleware, controllers);-+ app.use(nconf.get('relative_path'), express.static(path.join(__dirname, '../../', 'public'), {+ maxAge: app.enabled('cache') ? 5184000000 : 0+ }));app.use(catch404);app.use(handleErrors);});