favicon缓存
This commit is contained in:
parent
13e3b4804e
commit
963a41f27e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user