aboutsummaryrefslogtreecommitdiffstats
path: root/modules/httpcache/httpcache.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-01-15 05:17:03 +0800
committerGitHub <noreply@github.com>2021-01-14 23:17:03 +0200
commit84b147c7f0c2575723d3471783cb24078232fe7a (patch)
tree3b7ebea85a9be9deaffceb5e836c8073a604799b /modules/httpcache/httpcache.go
parent60a3297a33b2209ae7acf6fd84afd62e095e01aa (diff)
downloadgitea-84b147c7f0c2575723d3471783cb24078232fe7a.tar.gz
gitea-84b147c7f0c2575723d3471783cb24078232fe7a.zip
Use IsProd instead of testing if it's equal. (#14336)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/httpcache/httpcache.go')
-rw-r--r--modules/httpcache/httpcache.go2
1 files changed, 1 insertions, 1 deletions
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)