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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user