Backport #26107 by @wxiaoguang Just like others (oauth2 secret, internal token, etc), do not generate if no install lock Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit e2596b0a999b2d2b6ce699ac8b6a3981a89d5bd5)
This commit is contained in:
parent
4be3270e87
commit
78722734fe
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ func loadLFSFrom(rootCfg ConfigProvider) error {
|
|||
LFS.JWTSecretBytes = make([]byte, 32)
|
||||
n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64))
|
||||
|
||||
if err != nil || n != 32 {
|
||||
if (err != nil || n != 32) && InstallLock {
|
||||
LFS.JWTSecretBase64, err = generate.NewJwtSecretBase64()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error generating JWT Secret for custom config: %v", err)
|
||||
|
|
Loading…
Reference in a new issue