mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-15 10:13:10 +00:00
fix(nodeserver): add dummy favicon.ico to silence 404s
This commit is contained in:
parent
b8960c3710
commit
c76a120bfe
2 changed files with 4 additions and 0 deletions
BIN
lib/nodeserver/favicon.ico
Normal file
BIN
lib/nodeserver/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 894 B |
|
|
@ -92,6 +92,10 @@ StaticServlet.prototype.handleRequest = function(req, res) {
|
||||||
if (parts[parts.length-1].charAt(0) === '.')
|
if (parts[parts.length-1].charAt(0) === '.')
|
||||||
return self.sendForbidden_(req, res, path);
|
return self.sendForbidden_(req, res, path);
|
||||||
|
|
||||||
|
// favicon rewriting
|
||||||
|
if (path === './favicon.ico')
|
||||||
|
return self.sendFile_(req, res, './lib/nodeserver/favicon.ico');
|
||||||
|
|
||||||
// docs rewriting
|
// docs rewriting
|
||||||
var REWRITE = /\/(guide|api|cookbook|misc|tutorial).*$/,
|
var REWRITE = /\/(guide|api|cookbook|misc|tutorial).*$/,
|
||||||
IGNORED = /(\.(css|js|png|jpg)$|partials\/.*\.html$)/,
|
IGNORED = /(\.(css|js|png|jpg)$|partials\/.*\.html$)/,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue