Skip to content

Commit 78380ac

Browse files
authored
Added gzip skipping as note (#20)
Added the solution to problem with blank page when using gzip to documents for better visibility GH-19
1 parent 2c359ae commit 78380ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,17 @@ func main() {
7070

7171
![swagger_index.html](https://user-images.githubusercontent.com/8943871/36250587-40834072-1279-11e8-8bb7-02a2e2fdd7a7.png)
7272

73+
Note: If you are using Gzip middleware you should add the swagger endpoint to skipper
74+
75+
### Example
76+
77+
```
78+
e.Use(middleware.GzipWithConfig(middleware.GzipConfig{
79+
Skipper: func(c echo.Context) bool {
80+
if strings.Contains(c.Request().URL.Path, "swagger") {
81+
return true
82+
}
83+
return false
84+
},
85+
}))
86+
```

0 commit comments

Comments
 (0)