From 01ff8f69aab5f7433054a493aae462e2334819bc Mon Sep 17 00:00:00 2001 From: mappu Date: Fri, 19 May 2023 19:12:26 +1200 Subject: [PATCH] preview: enable client-side caching for up to 1 year --- thumb.go | 1 + 1 file changed, 1 insertion(+) diff --git a/thumb.go b/thumb.go index fcb20e9..20a01d6 100644 --- a/thumb.go +++ b/thumb.go @@ -104,6 +104,7 @@ func (this *Server) handleThumbInternal(ctx context.Context, w http.ResponseWrit return err } + w.Header().Set(`Cache-Control`, `max-age=31536000, immutable`) w.Header().Set(`Content-Length`, fmt.Sprintf("%d", len(thumb))) w.Header().Set(`Content-Type`, `image/jpeg`) w.WriteHeader(200)