選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

13 行
287 B

  1. package middleware
  2. import "github.com/gin-gonic/gin"
  3. func DisableCache() gin.HandlerFunc {
  4. return func(c *gin.Context) {
  5. c.Header("Cache-Control", "no-store, no-cache, must-revalidate, private, max-age=0")
  6. c.Header("Pragma", "no-cache")
  7. c.Header("Expires", "0")
  8. c.Next()
  9. }
  10. }