From 3d8d3f617852f36ef0b2ed9e175db5a12ca268d3 Mon Sep 17 00:00:00 2001 From: Gregor Best <gbe@unobtanium.de> Date: Tue, 20 Apr 2021 22:32:52 +0200 Subject: [PATCH] Skip favicon --- handler-index.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/handler-index.go b/handler-index.go index cf0b064..2beab74 100644 --- a/handler-index.go +++ b/handler-index.go @@ -12,6 +12,11 @@ import ( var indexTemplate = template.Must(template.ParseFS(templateFS, "templates/base.tpl", "templates/index.tpl")) func (h Handler) index(w http.ResponseWriter, r *http.Request) { + if r.URL.String() == "/favicon.ico" { + http.Error(w, "nothing to see here", http.StatusNotFound) + return + } + log.Println("handling", r.Method, r.URL, "from", r.RemoteAddr) if r.Method == "GET" { -- GitLab