aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-13 18:04:07 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-13 18:04:07 -0400
commit4a8a70dde0f6fd7c5409766d30e6cc932b43b7c8 (patch)
tree288060715a884fb2199a5693e472dbb899b899ba /cmd
parent89bd994c836ecc9b6ceb80849f470521e1b15917 (diff)
downloadgitea-4a8a70dde0f6fd7c5409766d30e6cc932b43b7c8.tar.gz
gitea-4a8a70dde0f6fd7c5409766d30e6cc932b43b7c8.zip
Fix gzip
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 395658f6ed..f5843f5f39 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -63,7 +63,7 @@ func checkVersion() {
// Check dependency version.
macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], "."))
- if macaronVer.LessThan(git.MustParseVersion("0.2.0")) {
+ if macaronVer.LessThan(git.MustParseVersion("0.2.3")) {
log.Fatal(4, "Package macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
}
i18nVer := git.MustParseVersion(i18n.Version())
@@ -81,15 +81,15 @@ func newMacaron() *macaron.Macaron {
m := macaron.New()
m.Use(macaron.Logger())
m.Use(macaron.Recovery())
+ if setting.EnableGzip {
+ m.Use(macaron.Gziper())
+ }
m.Use(macaron.Static(
path.Join(setting.StaticRootPath, "public"),
macaron.StaticOptions{
SkipLogging: !setting.DisableRouterLog,
},
))
- // if setting.EnableGzip {
- // m.Use(macaron.Gzip())
- // }
m.Use(macaron.Renderer(macaron.RenderOptions{
Directory: path.Join(setting.StaticRootPath, "templates"),
Funcs: []template.FuncMap{base.TemplateFuncs},