fasten-onprem/backend/pkg/web/middleware/cache.go

12 lines
242 B
Go
Raw Permalink Normal View History

package middleware
import "github.com/gin-gonic/gin"
func CacheMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Cache-Control", "no-cache")
c.Writer.Header().Set("Pragma", "no-cache")
c.Next()
}
}