File tree 4 files changed +8
-3
lines changed
4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ require (
71
71
github.com/prometheus/procfs v0.16.1 // indirect
72
72
github.com/randall77/makefat v0.0.0-20210315173500-7ddd0e42c844 // indirect
73
73
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
74
+ github.com/vearutop/statigz v1.5.0 // indirect
74
75
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
75
76
go.opentelemetry.io/otel v1.35.0 // indirect
76
77
go.opentelemetry.io/otel/metric v1.35.0 // indirect
Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
164
164
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg =
165
165
github.com/stretchr/testify v1.9.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
166
166
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA =
167
+ github.com/vearutop/statigz v1.5.0 h1:FuWwZiT82yBw4xbWdWIawiP2XFTyEPhIo8upRxiKLqk =
168
+ github.com/vearutop/statigz v1.5.0 /go.mod h1:oHmjFf3izfCO804Di1ZjB666P3fAlVzJEx2k6jNt/Gk =
167
169
github.com/yuin/goldmark v1.3.5 /go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k =
168
170
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0 =
169
171
go.etcd.io/bbolt v1.3.11 /go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I =
Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ package webui
2
2
3
3
import (
4
4
"net/http"
5
+
6
+ "github.com/vearutop/statigz"
5
7
)
6
8
7
9
func Handler () http.Handler {
8
-
10
+ return statigz . FileServer ( content , statigz . FSPrefix ( contentPrefix ))
9
11
}
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ func TestServeIndexNoGzip(t *testing.T) {
38
38
39
39
// Windows doesn't have the gzip binary, so we skip compression during the
40
40
// go:generate step on Windows
41
- if runtime .GOOS != "windows" && rr .Header ().Get ("Content-Encoding" ) != "gzip " {
41
+ if runtime .GOOS != "windows" && rr .Header ().Get ("Content-Encoding" ) != "" {
42
42
t .Errorf ("handler returned wrong content encoding: got %v want %v" ,
43
- rr .Header ().Get ("Content-Encoding" ), "gzip " )
43
+ rr .Header ().Get ("Content-Encoding" ), "" )
44
44
}
45
45
}
46
46
You can’t perform that action at this time.
0 commit comments