From 3eb2696f8e58c7dd9b0508da18b2e9b1353194f9 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Sun, 24 Oct 2021 19:20:08 -0400 Subject: favicon finally --- cmd/server/main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/server') diff --git a/cmd/server/main.go b/cmd/server/main.go index fbd1530..5998fb7 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -229,6 +229,9 @@ func home(w http.ResponseWriter, r *http.Request) { func fileServerHandler(fs fs.FS, next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/favicon.ico" { + r.URL.Path = "/static/favicon.ico" + } if !strings.HasPrefix(r.URL.Path, "/static") { next.ServeHTTP(w, r) return -- cgit v1.2.3-73-g0e29