mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 16:23:52 +00:00
13 lines
287 B
Go
13 lines
287 B
Go
package middleware
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func DisableCache() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
c.Header("Cache-Control", "no-store, no-cache, must-revalidate, private, max-age=0")
|
|
c.Header("Pragma", "no-cache")
|
|
c.Header("Expires", "0")
|
|
c.Next()
|
|
}
|
|
}
|