Skip to content

Commit

Permalink
review.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored and traefiker committed Oct 30, 2019
1 parent 732584b commit d29a4e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/middlewares/compress.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ http:

### `excludedContentTypes`

`excludedContentTypes` specifies a list of content types to compare the `Content-Type` header to before compressing.
`excludedContentTypes` specifies a list of content types to compare the `Content-Type` header of the incoming requests to before compressing.

The requests with content types defined in `excludedContentTypes` are not compressed.

Expand Down
2 changes: 1 addition & 1 deletion pkg/middlewares/compress/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func New(ctx context.Context, next http.Handler, conf dynamic.Compress, name str
func (c *compress) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
mediaType, _, err := mime.ParseMediaType(req.Header.Get("Content-Type"))
if err != nil {
log.FromContext(middlewares.GetLoggerCtx(context.Background(), c.name, typeName)).Error(err)
log.FromContext(middlewares.GetLoggerCtx(context.Background(), c.name, typeName)).Debug(err)
}

if contains(c.excludes, mediaType) {
Expand Down

0 comments on commit d29a4e1

Please sign in to comment.