gzip compression, better images and link to concrete.style.

This commit is contained in:
Marvin Blum
2020-06-04 20:00:00 +02:00
committed by Marvin Blum
parent 5049febd48
commit ebf930f2b6
16 changed files with 262 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"github.com/NYTimes/gziphandler"
"github.com/caddyserver/certmagic"
"github.com/emvi/logbuch"
"github.com/gorilla/mux"
@@ -42,7 +43,7 @@ func logEnvConfig() {
func setupRouter() *mux.Router {
router := mux.NewRouter()
router.PathPrefix(staticDirPrefix).Handler(http.StripPrefix(staticDirPrefix, http.FileServer(http.Dir(staticDir))))
router.PathPrefix(staticDirPrefix).Handler(http.StripPrefix(staticDirPrefix, gziphandler.GzipHandler(http.FileServer(http.Dir(staticDir)))))
return router
}