mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Avoid polluting the config (#25345)
Caught by #25330 Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -262,7 +262,7 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
|
||||
RunUser = rootSec.Key("RUN_USER").MustString(user.CurrentUsername())
|
||||
// The following is a purposefully undocumented option. Please do not run Gitea as root. It will only cause future headaches.
|
||||
// Please don't use root as a bandaid to "fix" something that is broken, instead the broken thing should instead be fixed properly.
|
||||
unsafeAllowRunAsRoot := rootSec.Key("I_AM_BEING_UNSAFE_RUNNING_AS_ROOT").MustBool(false)
|
||||
unsafeAllowRunAsRoot := ConfigSectionKeyBool(rootSec, "I_AM_BEING_UNSAFE_RUNNING_AS_ROOT")
|
||||
RunMode = os.Getenv("GITEA_RUN_MODE")
|
||||
if RunMode == "" {
|
||||
RunMode = rootSec.Key("RUN_MODE").MustString("prod")
|
||||
|
Reference in New Issue
Block a user