mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-10-24 17:25:19 +08:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user