Node.js based forum software built for the modern web
closes #2278
psychobunnyded8de905d4c
diff --git a/src/middleware/index.js b/src/middleware/index.jsindex e1b7c0c218..3758c0a712 100644--- a/src/middleware/index.js+++ b/src/middleware/index.js@@ -46,6 +46,13 @@ function routeCurrentTheme(app, themeId, themesData) {meta.themes.setPath(themeObj);}+function setupFavicon() {+ var faviconPath = path.join(__dirname, '../../', 'public', meta.config['brand:favicon'] ? meta.config['brand:favicon'] : 'favicon.ico');+ if (fs.existsSync(faviconPath)) {+ app.use(favicon(faviconPath));+ }+}+module.exports = function(app, data) {middleware = require('./middleware')(app);@@ -62,7 +69,8 @@ module.exports = function(app, data) {app.use(compression());- app.use(favicon(path.join(__dirname, '../../', 'public', meta.config['brand:favicon'] ? meta.config['brand:favicon'] : 'favicon.ico')));+ setupFavicon();+app.use(relativePath + '/apple-touch-icon', middleware.routeTouchIcon);app.use(bodyParser.urlencoded({extended: true}));