1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-24 04:15:56 +00:00

Add option for Gzip again, I removed it after v3 but seems users wants it back

This commit is contained in:
Gerasimos Maropoulos
2016-07-19 06:50:49 +03:00
parent 084b689d37
commit 6f91e6c588
4 changed files with 15 additions and 8 deletions

View File

@@ -135,10 +135,10 @@ func (r *responseEngineMap) render(ctx *Context, obj interface{}, options ...map
finalResult = append(finalResult, result...)
}
gzipEnabled := false
gzipEnabled := ctx.framework.Config.Gzip
charset := ctx.framework.Config.Charset
if len(options) > 0 {
gzipEnabled = getGzipOption(options[0]) // located to the template.go below the RenderOptions
gzipEnabled = getGzipOption(ctx, options[0]) // located to the template.go below the RenderOptions
if chs := getCharsetOption(options[0]); chs != "" {
charset = chs
}