From 17ae0ed3eef54d96bd179ff7fec0540cf3024748 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 29 Feb 2020 16:29:17 +0800 Subject: 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 --- internal/context/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/context') 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() -- cgit v1.2.3