From 0fde351386a1e2af624af56ba9c5b77c4139ea13 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Thu, 8 Jan 2026 16:14:30 +0000 Subject: [PATCH] appview: use static logo/favicon files these files are now generated at build time. Signed-off-by: oppiliappan --- appview/pages/templates/layouts/base.html | 4 ++++ appview/state/router.go | 2 -- appview/state/state.go | 13 ------------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/appview/pages/templates/layouts/base.html b/appview/pages/templates/layouts/base.html index f357201d..9a81126c 100644 --- a/appview/pages/templates/layouts/base.html +++ b/appview/pages/templates/layouts/base.html @@ -11,6 +11,10 @@ + + + + diff --git a/appview/state/router.go b/appview/state/router.go index 6b14e647..d81e780f 100644 --- a/appview/state/router.go +++ b/appview/state/router.go @@ -32,8 +32,6 @@ func (s *State) Router() http.Handler { s.pages, ) - router.Get("/favicon.svg", s.Favicon) - router.Get("/favicon.ico", s.Favicon) router.Get("/pwa-manifest.json", s.PWAManifest) router.Get("/robots.txt", s.RobotsTxt) diff --git a/appview/state/state.go b/appview/state/state.go index 11d94a5d..ab1f1ae4 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -202,19 +202,6 @@ func (s *State) Close() error { return s.db.Close() } -func (s *State) Favicon(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "image/svg+xml") - w.Header().Set("Cache-Control", "public, max-age=31536000") // one year - w.Header().Set("ETag", `"favicon-svg-v1"`) - - if match := r.Header.Get("If-None-Match"); match == `"favicon-svg-v1"` { - w.WriteHeader(http.StatusNotModified) - return - } - - s.pages.Favicon(w) -} - func (s *State) RobotsTxt(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain") w.Header().Set("Cache-Control", "public, max-age=86400") // one day -- 2.51.2