preview: enable client-side caching for up to 1 year
This commit is contained in:
parent
3e5fb091c9
commit
01ff8f69aa
1
thumb.go
1
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)
|
||||
|
Loading…
Reference in New Issue
Block a user