fix custom logos not loading on fr and ko sites (ref #70)

This commit is contained in:
orenom
2022-07-23 19:01:00 +02:00
parent a294c51118
commit f898d7b546
4 changed files with 30 additions and 5 deletions
+3 -4
View File
@@ -453,10 +453,9 @@ module.exports = function(redis) {
return `${static_path}/wikiless-favicon.ico`
}
this.customLogos = (req) => {
const lang = getLang(req)
if(lang === 'fr') {
return path.join(__dirname, '..', 'static', 'fr', path.basename(req.url))
this.customLogos = (url, lang) => {
if(validLang(lang)) {
return path.join(__dirname, '..', 'static', lang, path.basename(url))
}
return false
}