From 771a8955a4094f5fce24faaa826831995912ecb1 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 9 Mar 2021 22:46:43 -0500 Subject: [PATCH] fix: #9362 best not to check file exists on every page load; copying favicon to uploads/system folder instead --- public/uploads/system/favicon.ico | Bin 0 -> 1150 bytes src/meta/tags.js | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 public/uploads/system/favicon.ico diff --git a/public/uploads/system/favicon.ico b/public/uploads/system/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..e73d1c154679373618773f34f549817ba20b1971 GIT binary patch literal 1150 zcmds%%}N4M6o8K~kqd(s(W26{tR@nAg}{Xm;HFkrd=x+_qvfF zA%#fj1uCaiDMW~beRnGA6>8-3T+cb*IWx0R#K&iNSojW0))E;N5gSO6`OFhUsQtG~ zFOQ2}9vdPi^~(5(UY$78YZH!M3p#o|nA01foZ1LEU!0LUfg}upaR+fval5z=xHshQ z>F+~Lr9Aq?d$=L@0A1#uf^lQGE!-x=*c+f8SEA3+rbmZpash}zlUXe=?gHK; zd#{)`LQU|Z^t);+-0;YRU6lz(ISX-w+7&&Iuz){+TjZYG%)2C4qVEE_^w!mO#L!hc zQx{O;d`Z4dy-4qX_YT&Baqjtv-7d4M)N1tg=&$SDX+sZcP$lP5dxAI!&ueC!v-_2K z34DvZO<#-thTe-d^!`i>Y<^pip!N#q^cmOB?lQaIaFg6yfZ8H`uIFZF8#+7d>Vvt( z%Ap-#PLkRiJ!O19I|V;Ye8zvlzomAE`%dpQ-ZkDk+;P5T)(f>~W~7PYz3)`W!e8RK z3n~+F@EvLnejX=ZIhuDo4s8d&Kz<3|GX7t``hAgaj(tB*<2QdET)%VXZ20as@dI { }); } - 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 Tags const 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`,