diff --git a/succbone/succd/http.go b/succbone/succd/http.go index 5822425..3e24873 100644 --- a/succbone/succd/http.go +++ b/succbone/succd/http.go @@ -19,8 +19,15 @@ var ( //go:embed index.html templateIndexText string templateIndex = template.Must(template.New("index").Parse(templateIndexText)) + //go:embed succd.png + favicon []byte ) +func (d *daemon) httpFavicon(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "image/png") + w.Write(favicon) +} + func formatVolts(v float32) string { return fmt.Sprintf("%.4f V", v) } diff --git a/succbone/succd/index.html b/succbone/succd/index.html index 14fb9dd..363ce94 100644 --- a/succbone/succd/index.html +++ b/succbone/succd/index.html @@ -2,6 +2,7 @@ succd + + +

succd

nothing more permanent than a temporary solution

-

+

diff --git a/succbone/succd/main.go b/succbone/succd/main.go index 913f29e..85581c1 100644 --- a/succbone/succd/main.go +++ b/succbone/succd/main.go @@ -201,6 +201,7 @@ func main() { } http.HandleFunc("/", d.httpIndex) + http.HandleFunc("/favicon.png", d.httpFavicon) http.HandleFunc("/stream", d.httpStream) http.HandleFunc("/metrics", d.httpMetrics) http.HandleFunc("/button/vent", d.httpButtonVent)
Voltage