chore: favicon and old file rm
This commit is contained in:
10
main.go
10
main.go
@@ -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"))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user