1
0
mirror of https://github.com/trambarhq/relaks-wordpress-example.git synced 2025-09-02 12:42:38 +02:00

Took out check for favicon.ico for simplicity sake.

This commit is contained in:
Chung Leong
2019-02-06 23:38:14 +01:00
parent c41e9f282d
commit 13af0951a7

View File

@@ -101,14 +101,6 @@ let pageDependencies = {};
async function handlePageRequest(req, res, next) {
try {
let path = req.url;
if (path === '/favicon.ico') {
// while the HTML template contains a link tag that suppress the
// loading of favicon.ico, the browser could ask for it still if
// the page fails to load
let err = new Error('File not found');
err.status = 404;
throw err;
}
let noJS = (req.query.js === '0');
let target = (req.isSpider() || noJS) ? 'seo' : 'hydrate';
let page = await PageRenderer.generate(path, target);