From ba1c0d4129d4f442ec32274814d9474fc0115359 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Tue, 20 Jun 2023 17:36:54 +0100 Subject: [PATCH] If no favicon is found then break out and send an internal reverse proxy request --- servers/https.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/https.go b/servers/https.go index 9718cf6..132d1a6 100644 --- a/servers/https.go +++ b/servers/https.go @@ -72,6 +72,9 @@ func setupFaviconMiddleware(fav *favicons.Favicons, next http.Handler) http.Hand switch req.URL.Path { case "/favicon.svg", "/favicon.png", "/favicon.ico": icons := fav.GetIcons(req.Host) + if icons == nil { + break + } raw, contentType, err := icons.ProduceForExt(path.Ext(req.URL.Path)) if err != nil { utils.RespondVioletError(rw, http.StatusTeapot, "No icon available")