diff --git a/assets/favicon.ico b/assets/favicon.ico new file mode 100644 index 0000000..745e6fb Binary files /dev/null and b/assets/favicon.ico differ diff --git a/handlers/assets.go b/handlers/assets.go index 100abc0..78c012d 100644 --- a/handlers/assets.go +++ b/handlers/assets.go @@ -10,3 +10,9 @@ func AssetsHandler(w http.ResponseWriter, r *http.Request) { log.Println("Serving " + r.URL.Path[1:]) http.ServeFile(w, r, r.URL.Path[1:]) } + +// FaviconHandler handles serving the favicon.ico +func FaviconHandler(w http.ResponseWriter, r *http.Request) { + log.Println("Serving " + r.URL.Path[1:]) + http.ServeFile(w, r, "assets/favicon.ico") +} diff --git a/main.go b/main.go index 0acd461..91a769b 100644 --- a/main.go +++ b/main.go @@ -81,6 +81,7 @@ func main() { } http.HandleFunc("/assets/", handlers.AssetsHandler) + http.HandleFunc("/favicon.ico", handlers.FaviconHandler) http.HandleFunc("/checks", handlers.CheckHandler) http.HandleFunc("/report/", makeHandler("report", handlers.ReportHandler)) http.HandleFunc("/badge/", makeHandler("badge", handlers.BadgeHandler))