diff --git a/internal/routes/routes.go b/internal/routes/routes.go index ce8a60d..cd7b07d 100644 --- a/internal/routes/routes.go +++ b/internal/routes/routes.go @@ -69,6 +69,12 @@ func folderRoute (superRoute *gin.RouterGroup,db *gorm.DB){ folderRoutes.GET("/file", middlewares.CheckAuth(db), func(c *gin.Context) { path := c.Query("path") filePath := filepath.Join("upload", filepath.Clean("/"+path)) + c.Header("Cache-Control", "no-cache, no-store, must-revalidate") + c.Header("Pragma", "no-cache") + c.Header("Expires", "0") + + // Supprime le support de "If-Modified-Since" pour forcer le 200 + c.Request.Header.Del("If-Modified-Since") ext := strings.ToLower(filepath.Ext(filePath)) if ext == ".mp4" || ext == ".mkv" || ext == ".webm" || ext == ".mp3" {