mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 21:07:06 +02:00
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>
This commit is contained in:
1 parent
04e97b8311
commit
3d10193be2
7 files changed
+52
-51
No files matched your search
@@ -62,7 +62,7 @@ func newLFSService() {
|
||||
}
|
||||
|
||||
// Save secret
|
||||
CreateOrAppendToCustomConf(func(cfg *ini.File) {
|
||||
CreateOrAppendToCustomConf("server.LFS_JWT_SECRET", func(cfg *ini.File) {
|
||||
cfg.Section("server").Key("LFS_JWT_SECRET").SetValue(LFS.JWTSecretBase64)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user