router_static.go: add charset for html content

This commit is contained in:
Adhityaa Chandrasekar 2019-02-20 11:07:29 -05:00
parent f4489c9921
commit 685f3a3a58

View File

@ -116,7 +116,7 @@ func staticRouterInit(router *mux.Router) error {
if path.Ext(p) != "" {
contentType[p] = mime.TypeByExtension(path.Ext(p))
} else {
contentType[p] = mime.TypeByExtension("html")
contentType[p] = "text/html; charset=utf-8"
}
router.HandleFunc(p, func(w http.ResponseWriter, r *http.Request) {