micro-analytics / micro-analytics-cli

Public analytics as a Node.js microservice. No sysadmin experience required! 📈
MIT License
734 stars 39 forks source link

favicon.ico #28

Open sean-roberts opened 7 years ago

sean-roberts commented 7 years ago

I've been using chrome to open up views to test and it's requesting for favicon.ico. Is there something we could/should do here? I think this could be a common usage pattern for people trying out the project/testing it.

So some sort of filtering or blacklist?

mxstbr commented 7 years ago

Yeah I've been getting that too, but I think it's largely inconsequential as it only happens when you open the service itself in a browser.

Generally, when used something like this:

fetch('myservice.com/bla')

No favicon visit will be counted, so I think this is fine? It mostly only applies to us developers of micro-analytics.

sean-roberts commented 7 years ago

Yeah, though I think it's worth saying that it will probably apply to any developer looking to see how the service works. Because that's just so easy of a test to play around.

I wonder if there is a way to support user-supplied filtering logic of requests going into the service. I think this is one use case but there might be plenty of others like IP whitelisting, blocking of endpoints that are being abused by a malicious 3rd party, any request that contains a "password" field, etc.

mxstbr commented 7 years ago

Yeah this'll probably tie into #11. Maybe we need some sort of general extensibility?

sean-roberts commented 7 years ago

I think so

relekang commented 7 years ago

We can maybe add this to the nginx example?

  location = /favicon.ico {
      access_log off;
      log_not_found off;
      return 204;
  }
sean-roberts commented 7 years ago

Not a bad idea either!

mxstbr commented 7 years ago

I like that, simple solution! 👏