Files
anonymous_overflow/src/middleware/noCache.go
2022-12-28 14:14:30 -05:00

13 lines
272 B
Go

package middleware
import "github.com/gin-gonic/gin"
func NoCacheMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Header("Cache-Control", "no-cache, no-store, must-revalidate")
c.Header("Pragma", "no-cache")
c.Header("Expires", "0")
c.Next()
}
}