mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: favicon path
This commit is contained in:
@@ -227,6 +227,9 @@ function setupHelmet(app) {
|
||||
function setupFavicon(app) {
|
||||
let faviconPath = meta.config['brand:favicon'] || 'favicon.ico';
|
||||
faviconPath = path.join(nconf.get('base_dir'), 'public', faviconPath.replace(/assets\/uploads/, 'uploads'));
|
||||
if (!faviconPath.startsWith(nconf.get('upload_path'))) {
|
||||
faviconPath = path.join(nconf.get('base_dir'), 'public', 'favicon.ico');
|
||||
}
|
||||
if (file.existsSync(faviconPath)) {
|
||||
app.use(nconf.get('relative_path'), favicon(faviconPath));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user