Use IsProd instead of testing if it's equal. (#14336)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
authored and GitHub committed 2021-01-14 23:17:03 +02:00
1 parent 60a3297a33
commit 84b147c7f0
7 files changed
+17 -14

No files matched your search

+1 -1
View File
@@ -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)