17 lines
344 B
Go
17 lines
344 B
Go
package httpapi
|
|
|
|
import (
|
|
_ "embed"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed static/favicon.ico
|
|
var faviconICO []byte
|
|
|
|
func (s *Server) handleFavicon(w http.ResponseWriter, _ *http.Request) {
|
|
w.Header().Set("Content-Type", "image/x-icon")
|
|
w.Header().Set("Cache-Control", "public, max-age=86400")
|
|
w.WriteHeader(http.StatusOK)
|
|
_, _ = w.Write(faviconICO)
|
|
}
|