From 84b147c7f0c2575723d3471783cb24078232fe7a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 15 Jan 2021 05:17:03 +0800 Subject: Use IsProd instead of testing if it's equal. (#14336) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath --- modules/httpcache/httpcache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/httpcache') diff --git a/modules/httpcache/httpcache.go b/modules/httpcache/httpcache.go index c4134f8e17..cf35cef129 100644 --- a/modules/httpcache/httpcache.go +++ b/modules/httpcache/httpcache.go @@ -17,7 +17,7 @@ import ( // GetCacheControl returns a suitable "Cache-Control" header value func GetCacheControl() string { - if setting.RunMode == "dev" { + if !setting.IsProd() { return "no-store" } return "private, max-age=" + strconv.FormatInt(int64(setting.StaticCacheTime.Seconds()), 10) -- cgit v1.2.3