cloudfront Cache-Control标头与原始标头

时间:2017-08-16 21:41:24

标签: amazon-cloudfront

我发现通过Cloudfront的请求具有与我的源不同的Cache-Control的情况。我将对象缓存设置为"使用原始缓存标头" (我不认为这是相关的)压缩对象自动设置为"否"

我发现如果我将对象缓存更改为"自定义"并更改其周围的值实际上会更改从CDN返回的标头。这没关系......但是我很想知道为什么在我现有的设置中这个标题没有被传递。

谢谢!

来自Origin的压缩请求 - 显示' 31536000'

的缓存控制
(05:34 PM) jsharpe@mbp:~ curl -I https://staging.testing.com/assets/application-0d5691ba401c3f5a305fda52745a831376545a605a6c16e50fc838fdaa567e57.css --compressed
HTTP/1.1 200 OK
Server: Cowboy
Date: Wed, 16 Aug 2017 21:34:22 GMT
Connection: keep-alive
Last-Modified: Wed, 16 Aug 2017 05:05:25 GMT
Content-Type: text/css
Cache-Control: public, max-age=31536000
Content-Encoding: gzip
Vary: Accept-Encoding, Origin
Content-Length: 33563
Via: 1.1 vegur

来自CDN的压缩请求 - 显示' 86400'

的缓存控制
(05:34 PM) jsharpe@mbp:~ curl -I https://staging-cdn.testing.com/assets/application-0d5691ba401c3f5a305fda52745a831376545a605a6c16e50fc838fdaa567e57.css --compressed
HTTP/1.1 200 OK
Content-Type: text/css
Content-Length: 33563
Connection: keep-alive
Server: Cowboy
Date: Wed, 16 Aug 2017 05:07:12 GMT
Last-Modified: Wed, 16 Aug 2017 05:05:25 GMT
Cache-Control: public, max-age=86400
Content-Encoding: gzip
Via: 1.1 vegur, 1.1 7d327ef7e21429ba6a44eb6374c976f3.cloudfront.net (CloudFront)
Vary: Accept-Encoding
Age: 59233
X-Cache: Hit from cloudfront
X-Amz-Cf-Id: TEqKbQ5ZYySY7m8rDft_MAlygEiam6gYvzrXBpS7D2DrBNbVUZ1y3Q==

0 个答案:

没有答案