fix(nodeserver): add dummy favicon.ico to silence 404s

This commit is contained in:
Igor Minar 2011-12-28 10:28:37 -08:00 committed by Vojta Jina
parent b8960c3710
commit c76a120bfe
2 changed files with 4 additions and 0 deletions

BIN
lib/nodeserver/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

View file

@ -92,6 +92,10 @@ StaticServlet.prototype.handleRequest = function(req, res) {
if (parts[parts.length-1].charAt(0) === '.')
return self.sendForbidden_(req, res, path);
// favicon rewriting
if (path === './favicon.ico')
return self.sendFile_(req, res, './lib/nodeserver/favicon.ico');
// docs rewriting
var REWRITE = /\/(guide|api|cookbook|misc|tutorial).*$/,
IGNORED = /(\.(css|js|png|jpg)$|partials\/.*\.html$)/,