Conditionnal compression based on Content-Type
This commit is contained in:
parent
1f39083555
commit
3410541a2f
7 changed files with 143 additions and 25 deletions
|
@ -168,7 +168,7 @@ func (b *Builder) buildConstructor(ctx context.Context, middlewareName string) (
|
|||
return nil, badConf
|
||||
}
|
||||
middleware = func(next http.Handler) (http.Handler, error) {
|
||||
return compress.New(ctx, next, middlewareName)
|
||||
return compress.New(ctx, next, *config.Compress, middlewareName)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue