preview: enable client-side caching for up to 1 year

This commit is contained in:
mappu 2023-05-19 19:12:26 +12:00
parent 3e5fb091c9
commit 01ff8f69aa
1 changed files with 1 additions and 0 deletions

View File

@ -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)