diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..49e4891 Binary files /dev/null and b/static/favicon.ico differ diff --git a/web/router.go b/web/router.go index fdc6956..ff2135c 100644 --- a/web/router.go +++ b/web/router.go @@ -27,6 +27,11 @@ func GetRouter(store storage.Store, htmlTemplates *template.Template, staticFS f // static files router.Handler("GET", "/static/*filepath", http.FileServer(http.FS(staticFS))) + // redirect /favicon.ico to /static/favicon.ico + router.GET("/favicon.ico", func(w http.ResponseWriter, r *http.Request, p httprouter.Params) { + http.Redirect(w, r, "/static/favicon.ico", http.StatusMovedPermanently) + }) + // api endpoints router.POST("/api/ping", ping.Handle())