all repos — elgit @ 10cfdcf04c8edac269a776a2d8fb53cc21223e25

fork of legit: web frontend for git, written in go

avoid logging errors on misguided favicon.ico requests

Alan Pearce
commit

10cfdcf04c8edac269a776a2d8fb53cc21223e25

parent

c81702be8dcb7d741031c9058921953a46206750

1 file changed, 7 insertions(+), 0 deletions(-)

changed files
M routes/handler.goroutes/handler.go
@@ -12,6 +12,7 @@ "time"
"github.com/fsnotify/fsnotify" "github.com/savsgio/atreugo/v11" + "github.com/valyala/fasthttp" "alin.ovh/elgit/config" )
@@ -101,6 +102,12 @@ d.mountRepoPaths(srv.NewGroupPath("/{category}/{name}"))
srv.StaticFS("/static/", staticFiles) srv.GET("/", d.Index) + srv.GET("/favicon.ico", func(rc *atreugo.RequestCtx) error { + return rc.TextResponse( + fasthttp.StatusMessage(fasthttp.StatusNoContent), + fasthttp.StatusNoContent, + ) + }) return srv }