viper-app/internal/server/common/cache.go

12 lines
224 B
Go
Raw Normal View History

2023-02-03 16:18:31 +08:00
package common
import (
"github.com/gin-gonic/gin"
)
func nocache(c *gin.Context) {
c.Header("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate")
c.Header("Pragma", "no-cache")
c.Header("Expires", "0")
}