【发布时间】:2016-10-28 07:46:36
【问题描述】:
我有一个使用 Cloudflare 的网站(例如 http://example.com)。没什么特别的,没有奇怪的页面规则,没有奇怪的设置,免费计划。
当我转到 http://example.com 时,我收到了 GET http://example.com 请求的响应:
Cache-Control:no-cache, must-revalidate
CF-RAY:2b8d0490837f2828-SJC
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Sun, 26 Jun 2016 01:52:05 GMT
Expires:0
Pragma:no-cache
Server:cloudflare-nginx
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:Express
请注意,响应没有 ETag 标头,即使它已在我的源服务器上启用。
当我直接访问源服务器时,例如GET http://01.23.456.789/,我得到这个回复:
Accept-Ranges:bytes
Cache-Control:no-cache, must-revalidate
Connection:keep-alive
Date:Sun, 26 Jun 2016 01:56:53 GMT
ETag:W/"4cf8-1558a5557a0"
Expires:0
Pragma:no-cache
X-Powered-By:Express
有谁知道为什么 Cloudflare 不转发 ETag 标头?如何让 Cloudflare 转发 ETag? Cloudflare 默认不缓存 GET http://example.com 请求,因为它是一个 HTML 页面。
【问题讨论】:
-
这看起来是个有趣的问题,您能否给 supportATcloudflareDOTcom 发送电子邮件,以便我们帮助您解决这个问题?
-
由于这种奇怪的 Cloudflare 行为,我损失了一整天...
标签: http cloudflare etag