mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
add site title to 404, on cold load anyways
This commit is contained in:
@@ -19,9 +19,17 @@ helpers.notFound = function(req, res, error) {
|
||||
error: error
|
||||
});
|
||||
} else if (res.locals.isAPI) {
|
||||
res.status(404).json({path: req.path.replace(/^\/api/, ''), error: error});
|
||||
res.status(404).json({
|
||||
path: req.path.replace(/^\/api/, ''),
|
||||
error: error,
|
||||
title: '[[global:404.title]]'
|
||||
});
|
||||
} else {
|
||||
res.status(404).render('404', {path: req.path, error: error});
|
||||
res.status(404).render('404', {
|
||||
path: req.path,
|
||||
error: error,
|
||||
title: '[[global:404.title]]'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user