diff --git a/autopost/server.js b/autopost/server.js index 3fa512b..ffbeb84 100644 --- a/autopost/server.js +++ b/autopost/server.js @@ -280,6 +280,26 @@ autopostRouter.get('/logout', (req, res) => { req.session.destroy(() => res.redirect('/autopost/login')); }); +// --------------------------- Favicon dynamique ----------------------------- +autopostRouter.get('/favicon.ico', (req, res) => { + const initials = config.name.substring(0, 2).toUpperCase(); + const svg = ``; + + res.setHeader('Content-Type', 'image/svg+xml'); + res.setHeader('Cache-Control', 'public, max-age=86400'); // Cache 24h + res.send(svg); +}); + function checkAuth(req, res, next) { if (req.session && req.session.authenticated) { next(); diff --git a/autopost/views/autopost.html b/autopost/views/autopost.html index 94562cb..3f01f3d 100644 --- a/autopost/views/autopost.html +++ b/autopost/views/autopost.html @@ -4,6 +4,7 @@