Compress more http content-types.

Also, some minor refactoring
This commit is contained in:
Deluan 2022-11-26 13:13:05 -05:00
parent 472f99b2b5
commit 1b5f855bff
5 changed files with 38 additions and 26 deletions

View file

@ -73,6 +73,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"AppConfig": string(j),
"Version": version,
}
w.Header().Set("Content-Type", "text/html")
err = t.Execute(w, data)
if err != nil {
log.Error(r, "Could not execute `index.html` template", err)