summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorClar Fon <15850505+clarfonthey@users.noreply.github.com>2022-10-01 13:26:33 -0400
committerGitHub <noreply@github.com>2022-10-02 01:26:33 +0800
commit3d10193be2b4476d1d0d3249a9884fcc0faa64e5 (patch)
treea94e7a09e276682f28955fcaa515d9a096254df4 /cmd/web.go
parent04e97b83115e7439d43c0ede5fe2d1b50d201c52 (diff)
downloadgitea-3d10193be2b4476d1d0d3249a9884fcc0faa64e5.tar.gz
gitea-3d10193be2b4476d1d0d3249a9884fcc0faa64e5.zip
Allow specifying SECRET_KEY_URI, similar to INTERNAL_TOKEN_URI (#19663)
Only load SECRET_KEY and INTERNAL_TOKEN if they exist. Never write the config file if the keys do not exist, which was only a fallback for Gitea upgraded from < 1.5 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index e09560bb86..1b9f7e420a 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -203,7 +203,7 @@ func setPort(port string) error {
defaultLocalURL += ":" + setting.HTTPPort + "/"
// Save LOCAL_ROOT_URL if port changed
- setting.CreateOrAppendToCustomConf(func(cfg *ini.File) {
+ setting.CreateOrAppendToCustomConf("server.LOCAL_ROOT_URL", func(cfg *ini.File) {
cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL)
})
}