feat(backend/assets): set 30 days cache age for all s3 files

This commit is contained in:
Alexander Zavorotynskiy 2023-03-22 12:59:02 +01:00
parent 517b98197a
commit 561f333870

View file

@ -33,10 +33,6 @@ func NewS3(region string, bucket string) *S3 {
func (s3 *S3) Upload(reader io.Reader, key string, contentType string, gzipped bool) error {
cacheControl := "max-age=2628000, immutable, private"
// For asset files we set max-age to 1 day
if !gzipped {
cacheControl = "max-age=86400, immutable, private"
}
var contentEncoding *string
if gzipped {
gzipStr := "gzip"