mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Make static resouces web browser cache time customized on app.ini (#8442)
* make static resouces web browser cache time customized on app.ini * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: zeripath <art27@cantab.net> * Update custom/conf/app.ini.sample Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * fix docs
This commit is contained in:
		@@ -87,6 +87,7 @@ var (
 | 
			
		||||
	CertFile             string
 | 
			
		||||
	KeyFile              string
 | 
			
		||||
	StaticRootPath       string
 | 
			
		||||
	StaticCacheTime      time.Duration
 | 
			
		||||
	EnableGzip           bool
 | 
			
		||||
	LandingPageURL       LandingPage
 | 
			
		||||
	UnixSocketPermission uint32
 | 
			
		||||
@@ -607,6 +608,7 @@ func NewContext() {
 | 
			
		||||
	OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
 | 
			
		||||
	DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
 | 
			
		||||
	StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(AppWorkPath)
 | 
			
		||||
	StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
 | 
			
		||||
	AppDataPath = sec.Key("APP_DATA_PATH").MustString(path.Join(AppWorkPath, "data"))
 | 
			
		||||
	EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
 | 
			
		||||
	EnablePprof = sec.Key("ENABLE_PPROF").MustBool(false)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user