Closed kylemac closed 9 years ago
Is there a default favicon slash will it serve favicon.ico
from the root if none are provided in the options?
currently if you don't pass a favicon in your options, we don't use the serve-favicon middleware and it defaults to your browsers behavior which would look for favicon.ico in root.
I decided against having our own charge default favicon - but I could be swayed.
Migrating this from a discussion on slack:
[Adding serve-favicon] sounds like a bad idea... when I look at a new project I expect the favicon to be at the root. It's kinda an important convention. If someone really needs it to be in a different place then they should just symlink it or use a redirect. And for caching: wouldn't a generic caching mechanism suffice?
we haven't been looking for this feature in the last year, so yagni for now.
admittedly the test is pretty weak, but i'm not really sure how else to test it - so I just added a test that makes sure that by defining a custom favicon it doesn't break a normal html request. I'm open to suggestions.
/cc @joshrowley @jenius