From 985d43d2d29ed10639ab75a80cb68c9eb2e594c5 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Wed, 17 Apr 2024 11:34:30 +0300 Subject: [PATCH] use the new favicon --- server.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/server.js b/server.js index 88c5b7b..4d6534d 100644 --- a/server.js +++ b/server.js @@ -93,29 +93,13 @@ nextApp // Add the middleware to set 'x-forwarded-host' header server.use((req, res, next) => { req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host; - // --------------- - // if (!baseUrlGlobal) { - // const protocol = req.headers['x-forwarded-proto'] || 'http'; - // const host = req.headers.host; - // const baseUrl = `${protocol}://${host}`; - // baseUrlGlobal = baseUrl; - // fs.writeFileSync(path.join(__dirname, 'baseUrl.txt'), baseUrlGlobal, 'utf8'); - // console.log("baseUrlGlobal set to: " + baseUrlGlobal); - // } next(); }); - server.use("/favicon.ico", express.static("styles/favicon_io/favicon.ico")); + server.use("/favicon.ico", express.static("public/favicon.png")); // server.use("/robots.txt", express.static("styles/favicon_io/robots.txt")); // server.use("/sitemap.xml", express.static("styles/favicon_io/sitemap.xml")); server.get("/last_schedule_json", (req, res) => { - // var data = JSON.parse(fs.readFileSync("./content/sources/march_flat.json", "utf8")); - // const newData = data.map((item) => { - // const names = item.names.filter((name) => { - // return !name.startsWith('Прибира количка') && !name.startsWith('Докарва количка'); - // }); - // return { ...item, names }; - // }); res.json(fs.readFileSync("./content/sources/march_flat.json", "utf8")); });