1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

feat: uses brotli on the fly for static files and gzip for streaming (#3825)

This commit is contained in:
Amir Raminfar
2025-04-21 11:14:57 -07:00
committed by GitHub
parent 55168fd81a
commit ccfab708d4
11 changed files with 82 additions and 60 deletions

View File

@@ -140,7 +140,7 @@ func createRouter(h *handler) *chi.Mux {
r.Get("/healthcheck", h.healthcheck)
defaultHandler := http.StripPrefix(strings.Replace(base+"/", "//", "/", 1), http.HandlerFunc(h.index))
r.Get("/*", func(w http.ResponseWriter, req *http.Request) {
r.With(Brotli).Get("/*", func(w http.ResponseWriter, req *http.Request) {
defaultHandler.ServeHTTP(w, req)
})
})