mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix: Let's Encrypt configuration settings (#4911)
ENABLE_LETSENCRYPT and LETSENCRYPT_ACCEPTTOS were not being properly loaded from the config file, always resulting in the default settings being in place.
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							b5b39a56ad
						
					
				
				
					commit
					8e3e59fdb8
				
			@@ -741,8 +741,8 @@ func NewContext() {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		UnixSocketPermission = uint32(UnixSocketPermissionParsed)
 | 
							UnixSocketPermission = uint32(UnixSocketPermissionParsed)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	EnableLetsEncrypt := sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
 | 
						EnableLetsEncrypt = sec.Key("ENABLE_LETSENCRYPT").MustBool(false)
 | 
				
			||||||
	LetsEncryptTOS := sec.Key("LETSENCRYPT_ACCEPTTOS").MustBool(false)
 | 
						LetsEncryptTOS = sec.Key("LETSENCRYPT_ACCEPTTOS").MustBool(false)
 | 
				
			||||||
	if !LetsEncryptTOS && EnableLetsEncrypt {
 | 
						if !LetsEncryptTOS && EnableLetsEncrypt {
 | 
				
			||||||
		log.Warn("Failed to enable Let's Encrypt due to Let's Encrypt TOS not being accepted")
 | 
							log.Warn("Failed to enable Let's Encrypt due to Let's Encrypt TOS not being accepted")
 | 
				
			||||||
		EnableLetsEncrypt = false
 | 
							EnableLetsEncrypt = false
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user