Skip to content

Commit

Permalink
Added gzip skipping as note (#20)
Browse files Browse the repository at this point in the history
Added the solution to problem with blank page when using gzip to documents for better visibility GH-19
  • Loading branch information
bilal-kilic authored Oct 12, 2021
1 parent 2c359ae commit 78380ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,17 @@ func main() {

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

Note: If you are using Gzip middleware you should add the swagger endpoint to skipper

### Example

```
e.Use(middleware.GzipWithConfig(middleware.GzipConfig{
Skipper: func(c echo.Context) bool {
if strings.Contains(c.Request().URL.Path, "swagger") {
return true
}
return false
},
}))
```

0 comments on commit 78380ac

Please sign in to comment.