mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Fixed favicon not being loaded from url. (#6113)
* Fixed favicon not being loaded from url. * Fixed tests.
This commit is contained in:
parent
1a61994c61
commit
9e2c4bf781
2 changed files with 16 additions and 0 deletions
|
@ -43,6 +43,16 @@ exports.expressPreSession = async (hookName, {app}) => {
|
|||
|
||||
app.get('/favicon.ico', (req, res, next) => {
|
||||
(async () => {
|
||||
/*
|
||||
If this is a url we simply redirect to that one.
|
||||
*/
|
||||
if (settings.favicon && settings.favicon.startsWith('http')) {
|
||||
res.redirect(settings.favicon);
|
||||
res.send();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const fns = [
|
||||
...(settings.favicon ? [path.resolve(settings.root, settings.favicon)] : []),
|
||||
path.join(settings.root, 'src', 'static', 'skins', settings.skinName, 'favicon.ico'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue