mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-09 02:55:51 +02:00
closes #2278
This commit is contained in:
@@ -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}));
|
||||
|
||||
Reference in New Issue
Block a user