Node.js based forum software built for the modern web
fix: #9362 best not to check file exists on every page load; copying favicon to uploads/system folder instead
psychobunny771a8955a409
diff --git a/public/uploads/system/favicon.ico b/public/uploads/system/favicon.iconew file mode 100644index 0000000000..e73d1c1546Binary files /dev/null and b/public/uploads/system/favicon.ico differdiff --git a/src/meta/tags.js b/src/meta/tags.jsindex 421982c4f4..4c02171a42 100644--- a/src/meta/tags.js+++ b/src/meta/tags.js@@ -6,7 +6,6 @@ const winston = require('winston');const plugins = require('../plugins');const Meta = require('./index');const utils = require('../utils');-const file = require('./src/file');const Tags = module.exports;@@ -56,14 +55,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`;+ const faviconPath = `${relative_path}/assets/uploads/system/favicon.ico`;+ const cacheBuster = `${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`;// Link Tagsconst defaultLinks = [{rel: 'icon',type: 'image/x-icon',- href: `${faviconPath}${Meta.config['cache-buster'] ? `?${Meta.config['cache-buster']}` : ''}`,+ href: `${faviconPath}${cacheBuster}`,}, {rel: 'manifest',href: `${relative_path}/manifest.webmanifest`,