chore: favicon and old file rm

This commit is contained in:
2026-07-01 23:23:30 +03:00
parent 09f080c266
commit a720183da5
6 changed files with 336 additions and 1 deletions

10
main.go
View File

@@ -83,6 +83,10 @@ func mimeHandler(next http.Handler) http.Handler {
ct = "text/css"
case "webp":
ct = "image/webp"
case "svg":
ct = "image/svg+xml"
case "ico":
ct = "image/x-icon"
}
if ct != "" {
next.ServeHTTP(&mimeWriter{ResponseWriter: w, override: ct}, r)
@@ -100,6 +104,12 @@ func main() {
mux.HandleFunc("/ABSTRACTS.webp", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "ABSTRACTS.webp")
})
mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "favicon.ico")
})
mux.HandleFunc("/favicon.svg", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "favicon.svg")
})
mux.Handle("/src/", http.StripPrefix("/src/", http.FileServer(http.Dir("src"))))
mux.Handle("/content/images/", http.StripPrefix("/content/images/", http.FileServer(http.Dir("content/images"))))