lib/assets: Allow assets to remain uncompressed (#6661)

This commit is contained in:
greatroar
2020-05-25 08:51:27 +02:00
committed by GitHub
parent c3b5eba205
commit baa38eea7a
8 changed files with 104 additions and 49 deletions
+2 -6
View File
@@ -268,17 +268,13 @@ func handleAssets(w http.ResponseWriter, r *http.Request) {
path = "index.html"
}
content, ok := auto.Assets()[path]
as, ok := auto.Assets()[path]
if !ok {
w.WriteHeader(http.StatusNotFound)
return
}
assets.Serve(w, r, assets.Asset{
ContentGz: content,
Filename: path,
Modified: time.Unix(auto.Generated, 0).UTC(),
})
assets.Serve(w, r, as)
}
func handleRequest(w http.ResponseWriter, r *http.Request) {