From 79a2745b4af3420d154a28d64c5db65ec2ec363b Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 22 Dec 2016 00:27:45 -0500 Subject: Set ProdMode in the correct place Closes #3696, #3611 Previously, ProdMode can only be true for web server, which always prints dev mode log message to incoming SSH connections and leaks unexpected information. --- modules/setting/setting.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 8ef8cef4..e7202b01 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -490,6 +490,8 @@ func NewContext() { } } + ProdMode = Cfg.Section("").Key("RUN_MODE").String() == "prod" + // Determine and create root git repository path. sec = Cfg.Section("repository") RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories")) -- cgit v1.2.3