Have configured a 404 custom error page.
Everytime a layut page is loaded in the browser or current page is refreshed, the 404 page is also returned. It does not do anything, but its a waste of resources.
If there is no 404 page configured, it works ok.
This is the piece of code that I found in lib\server.js
that is causing this. Not sure what the fix is supposed to be:
start: function(port) {
// We add the 404 and 500 routes as last
app.use((req, res) => {
// if user has a custom 404 page, redirect to it
if (req.accepts('html') && req.url != '/404' && app.get('has404')) {
//res.redirect(303, '/404');
res.status(404);
req.url = '/404';
app.handle(req, res);
} else {
res.status(404).json({
status: '404',
message: `${req.url} not found.`
});
}
});