[object Object]

← back to Wallco

Add root /favicon.{ico,svg} route (static is mounted under /static, so browser /favicon.ico 404'd)

6ce4019cd9ca36360920727242f76edec6f804a0 · 2026-05-31 18:47:22 -0700 · Steve Abrams

Files touched

Diff

commit 6ce4019cd9ca36360920727242f76edec6f804a0
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun May 31 18:47:22 2026 -0700

    Add root /favicon.{ico,svg} route (static is mounted under /static, so browser /favicon.ico 404'd)
---
 server.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server.js b/server.js
index 059ea4e..428374f 100644
--- a/server.js
+++ b/server.js
@@ -48,6 +48,8 @@ const upload = multer({
 });
 
 const app = express();
+
+app.get(['/favicon.ico','/favicon.svg'], (req, res) => res.sendFile(require('path').join(__dirname, 'public', req.path.slice(1))));
 app.use(express.json({ limit: '2mb' }));
 app.use((_req, res, next) => {
   res.set('X-Content-Type-Options', 'nosniff');

← 2e577e5 Add per-site favicon (kills /favicon.ico 404)  ·  back to Wallco  ·  Scrub residual vendor names from products.json (title/vendor 652c5c2 →