vesparny / fair-analytics

📊 An analytics server that doesn't undermine user's privacy
MIT License
748 stars 24 forks source link

Add/ignore favicon #18

Closed joehand closed 7 years ago

joehand commented 7 years ago

Logs are a bit noisy because of the missing favicon route. It'd be nice to either have one or ignore that route:

/favicon.ico
Error: Not Found
    at createError (/usr/src/app/node_modules/fair-analytics/lib/server.js:9:15)
    at app.use (/usr/src/app/node_modules/fair-analytics/lib/server.js:83:11)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
    at textParser (/usr/src/app/node_modules/body-parser/lib/types/text.js:69:7)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
vesparny commented 7 years ago

yes I think I will just do something like

app.get('/favicon.ico', (req, res) => res.sendStatus(204))

makes sense?

vesparny commented 7 years ago

@joehand ready in 1.2.2

vesparny commented 7 years ago

@joehand I've added you to the repo as a collaborator. Please tell me if you want me to grant you access to npm as well