]> source.dussan.org Git - gitea.git/commitdiff
Fix: Let's Encrypt configuration settings (#4911)
authorDrew Bowering <43180086+drewbowering@users.noreply.github.com>
Wed, 12 Sep 2018 04:06:44 +0000 (22:06 -0600)
committertechknowlogick <techknowlogick@users.noreply.github.com>
Wed, 12 Sep 2018 04:06:44 +0000 (00:06 -0400)
ENABLE_LETSENCRYPT and LETSENCRYPT_ACCEPTTOS were not being properly loaded from the config file, always resulting in the default settings being in place.

modules/setting/setting.go

index 3f3393f66c9313988120e3abcee79417d6141f40..882f565411a6401df572bcebe347bd3841b83157 100644 (file)
@@ -741,8 +741,8 @@ func NewContext() {
                }
                UnixSocketPermission = uint32(UnixSocketPermissionParsed)
        }
-       EnableLetsEncrypt := sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
-       LetsEncryptTOS := sec.Key("LETSENCRYPT_ACCEPTTOS").MustBool(false)
+       EnableLetsEncrypt = sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
+       LetsEncryptTOS = sec.Key("LETSENCRYPT_ACCEPTTOS").MustBool(false)
        if !LetsEncryptTOS && EnableLetsEncrypt {
                log.Warn("Failed to enable Let's Encrypt due to Let's Encrypt TOS not being accepted")
                EnableLetsEncrypt = false