We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb61fbe commit 67469b4Copy full SHA for 67469b4
website/content/middleware/gzip.md
@@ -44,3 +44,18 @@ DefaultGzipConfig = GzipConfig{
44
Level: -1,
45
}
46
```
47
+
48
+### Middleware Skipper
49
50
+A middleware skipper can be passed to avoid gzip to certain URLs:
51
52
+*Usage*
53
54
+```go
55
+e := echo.New()
56
+e.Use(middleware.GzipWithConfig(middleware.GzipConfig{
57
+ Skipper: func(c echo.Context) bool {
58
+ return strings.Contains(c.Path(), "metrics") // Change "metrics" for your own path
59
+ },
60
+}))
61
+```
0 commit comments