use the new favicon
This commit is contained in:
18
server.js
18
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"));
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user