How do I set the cache header for the cloud interface so that Google Pagespeed recognizes this?

I serve static content with S3 and through Cloudfront. However, Google Pagespeed flags that are not specified as a cache header, so I go to the cloud mode settings and change it.

enter image description here

As soon as the distribution is deployed. Google Pagespeed still does not recognize this.

I also add cache control to the object in S3. When I hit an object directly from S3, I see the response header, but when I hit the cloud interface URL, I don't see the cache control header.

Here is the answer I get

Accept-Ranges:bytes
Age:641
Connection:keep-alive
Content-Length:44715
Content-Type:image/png
Date:Fri, 17 Jul 2015 18:39:50 GMT
ETag:"e0b19573b90781f60f8865705c80f11d"
Last-Modified:Fri, 17 Jul 2015 17:50:27 GMT
Server:AmazonS3
Via:1.1 (CloudFront)
X-Amz-Cf-Id:
X-Cache:Hit from cloudfront
+4
source share
2 answers

HTTP-, , , 641 . , Cache-Control S3 . . , X-Cache Miss, , CloudFront .

. Google Pagespeed .

CloudFront Cache-Control. , CloudFront .

+1

. , , , - ... , , , , CloudFront. , S3 ( ).

+1

Source: https://habr.com/ru/post/1598760/


All Articles