diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-29 16:29:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 16:29:17 +0800 |
commit | 17ae0ed3eef54d96bd179ff7fec0540cf3024748 (patch) | |
tree | a9111282717da16feb83baf352ffb2ee5178ca0d /internal/context | |
parent | d59b0f6ff7ee24d94eaa5ad68173405faea6a81c (diff) |
conf: overhaul settings (#5953)
* Overhaul cache settings
* Overhaul HTTP settings
* conf: overhaul more settings
* log: make LGTM happy
* travis: upload report to Codecov
* Add codecov.yml
Diffstat (limited to 'internal/context')
-rw-r--r-- | internal/context/context.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/context/context.go b/internal/context/context.go index 3504ad71..4e555280 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -312,7 +312,7 @@ func Contexter() macaron.Handler { // If request sends files, parse them here otherwise the Query() can't be parsed and the CsrfToken will be invalid. if c.Req.Method == "POST" && strings.Contains(c.Req.Header.Get("Content-Type"), "multipart/form-data") { - if err := c.Req.ParseMultipartForm(conf.AttachmentMaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size + if err := c.Req.ParseMultipartForm(conf.Attachment.MaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size c.ServerError("ParseMultipartForm", err) return } @@ -324,7 +324,7 @@ func Contexter() macaron.Handler { log.Trace("CSRF Token: %v", c.Data["CSRFToken"]) c.Data["ShowRegistrationButton"] = !conf.Auth.DisableRegistration - c.Data["ShowFooterBranding"] = conf.ShowFooterBranding + c.Data["ShowFooterBranding"] = conf.Other.ShowFooterBranding c.renderNoticeBanner() |