mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #9362
This commit is contained in:
@@ -6,6 +6,7 @@ const winston = require('winston');
|
|||||||
const plugins = require('../plugins');
|
const plugins = require('../plugins');
|
||||||
const Meta = require('./index');
|
const Meta = require('./index');
|
||||||
const utils = require('../utils');
|
const utils = require('../utils');
|
||||||
|
const file = require('./src/file');
|
||||||
|
|
||||||
const Tags = module.exports;
|
const Tags = module.exports;
|
||||||
|
|
||||||
@@ -55,11 +56,14 @@ Tags.parse = async (req, data, meta, link) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uploadedFaviconPath = `${relative_path}/assets/uploads/system/favicon.ico`;
|
||||||
|
const faviconPath = await file.exists(uploadedFaviconPath) ? uploadedFaviconPath : `${relative_path}/favicon.ico`;
|
||||||
|
|
||||||
// Link Tags
|
// Link Tags
|
||||||
const defaultLinks = [{
|
const defaultLinks = [{
|
||||||
rel: 'icon',
|
rel: 'icon',
|
||||||
type: 'image/x-icon',
|
type: 'image/x-icon',
|
||||||
href: `${relative_path}/favicon.ico${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`,
|
href: `${faviconPath}${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`,
|
||||||
}, {
|
}, {
|
||||||
rel: 'manifest',
|
rel: 'manifest',
|
||||||
href: `${relative_path}/manifest.webmanifest`,
|
href: `${relative_path}/manifest.webmanifest`,
|
||||||
|
|||||||
Reference in New Issue
Block a user