Files
ip-echo/internal/httpapi/static.go
2026-05-13 03:05:24 +03:30

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)
}