mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	* Set RUN_MODE prod by default (#13765) I think it's a bad default to have "dev" as the default run mode which enables debugging and now also disables HTTP caching. It's better to just default to a value suitable for general deployments. Co-authored-by: techknowlogick <techknowlogick@gitea.io> * flip default in checkRunMode Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -43,12 +43,14 @@ import (
 | 
			
		||||
 | 
			
		||||
func checkRunMode() {
 | 
			
		||||
	switch setting.Cfg.Section("").Key("RUN_MODE").String() {
 | 
			
		||||
	case "prod":
 | 
			
		||||
	case "dev":
 | 
			
		||||
		git.Debug = true
 | 
			
		||||
	case "test":
 | 
			
		||||
		git.Debug = true
 | 
			
		||||
	default:
 | 
			
		||||
		macaron.Env = macaron.PROD
 | 
			
		||||
		macaron.ColorLog = false
 | 
			
		||||
		setting.ProdMode = true
 | 
			
		||||
	default:
 | 
			
		||||
		git.Debug = true
 | 
			
		||||
	}
 | 
			
		||||
	log.Info("Run Mode: %s", strings.Title(macaron.Env))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user