diff options
author | Clar Fon <15850505+clarfonthey@users.noreply.github.com> | 2022-10-01 13:26:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-02 01:26:33 +0800 |
commit | 3d10193be2b4476d1d0d3249a9884fcc0faa64e5 (patch) | |
tree | a94e7a09e276682f28955fcaa515d9a096254df4 /cmd/web.go | |
parent | 04e97b83115e7439d43c0ede5fe2d1b50d201c52 (diff) | |
download | gitea-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.go | 2 |
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) }) } |