diff --git a/middleware/cache.go b/middleware/cache.go index 0701f9c..022392c 100644 --- a/middleware/cache.go +++ b/middleware/cache.go @@ -8,7 +8,7 @@ import ( func SetStaticFileCache(c *gin.Context) { f := strings.Split(strings.TrimLeft(c.FullPath(), "/"), "/") - if len(f) > 1 && helper.IsContainInArr(f[0], []string{"wp-includes", "wp-content"}) { + if len(f) > 0 && helper.IsContainInArr(f[0], []string{"wp-includes", "wp-content", "favicon.ico"}) { c.Header("Cache-Control", "private, max-age=86400") } c.Next()