1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +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

@@ -94,6 +94,11 @@ type (
// defaults to "UTF-8"
Charset string
// Gzip enables gzip compression on your Render actions, this includes any type of render, templates and pure/raw content
// If you don't want to enable it globaly, you could just use the third parameter on context.Render("myfileOrResponse", structBinding{}, iris.RenderOptions{"gzip": true})
// defaults to false
Gzip bool
// Sessions contains the configs for sessions
Sessions Sessions
@@ -114,6 +119,7 @@ func Default() Iris {
DisableTemplateEngines: false,
IsDevelopment: false,
Charset: DefaultCharset,
Gzip: false,
ProfilePath: "",
Sessions: DefaultSessions(),
Websocket: DefaultWebsocket(),