In every request, my server is receiving GET request to /favicon.ico, even when it\'s REST api that not include html file. Why is this happening and how can I prevent this r
my preferred method is middleware
put this somewhere:
function ignoreFavicon(req, res, next) { if (req.originalUrl.includes('favicon.ico')) { res.status(204).end() } next(); }
then:
app.use(ignoreFavicon);