()
| 178 | } |
| 179 | |
| 180 | func NoCache() gin.HandlerFunc { |
| 181 | return func(c *gin.Context) { |
| 182 | // skip cache if Cache-Control header is set |
| 183 | if c.Writer.Header().Get("Cache-Control") == "" { |
| 184 | c.Header("Cache-Control", "no-cache, no-store, must-revalidate") |
| 185 | c.Header("Pragma", "no-cache") |
| 186 | c.Header("Expires", "0") |
| 187 | } |
| 188 | c.Next() |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | func AuthMiddleware() gin.HandlerFunc { |
| 193 | return func(c *gin.Context) { |
no test coverage detected