From c71834b43c96b81187221fa79f560dd281ceb846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 11 Feb 2019 23:05:53 +0000 Subject: [PATCH] chore(backend): bump caching headers to 1 year It's currently 30 days, if that works than why not set it to a much higher value --- assets.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets.go b/assets.go index f90300735..3eaf9bec9 100644 --- a/assets.go +++ b/assets.go @@ -93,8 +93,8 @@ func serveFileOr404(path string, contentType string, c *gin.Context) { func staticHeaders(prefix string) gin.HandlerFunc { return func(c *gin.Context) { if strings.HasPrefix(c.Request.URL.Path, prefix) { - c.Header("Cache-Control", "public, max-age=2592000") - expiresTime := time.Now().AddDate(0, 0, 30).Format(http.TimeFormat) + c.Header("Cache-Control", "public, max-age=31536000") + expiresTime := time.Now().AddDate(0, 0, 365).Format(http.TimeFormat) c.Header("Expires", expiresTime) } }