diff --git a/server/internal/api/v1/fs/img.go b/server/internal/api/v1/fs/img.go index 59fa5254..3c88cd19 100644 --- a/server/internal/api/v1/fs/img.go +++ b/server/internal/api/v1/fs/img.go @@ -31,9 +31,9 @@ func handleImgRequest(c *gin.Context) { } else if img == nil { c.AbortWithStatus(http.StatusNotFound) } else { - // TODO: Caching c.Writer.WriteHeader(http.StatusOK) c.Writer.Header().Set("Content-Type", "image/webp") + c.Writer.Header().Set("Cache-Control", "public, max-age=31536000, immutable") defer img.Close() io.Copy(c.Writer, img) }