avoid logging for common 404s

This commit is contained in:
ansuz 2023-05-03 16:32:09 +05:30
parent e895990426
commit b753a067ac
1 changed files with 6 additions and 1 deletions

View File

@ -424,7 +424,12 @@ app.get('/api/profiling', function (req, res) {
});
app.use(function (req, res /*, next */) {
Log.info('HTTP_404', req.url);
if (/^(\/favicon\.ico\/|.*\.js\.map)$/.test(req.url)) {
// ignore common 404s
} else {
Log.info('HTTP_404', req.url);
}
res.status(404);
send404(res, custom_four04_path);
});