gpt4 book ai didi

http - Cloudflare 不转发 ETag header ?

转载 作者:可可西里 更新时间:2023-11-01 15:19:26 25 4
gpt4 key购买 nike

我有一个使用 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 header ,即使它在我的源服务器上已启用。

当我直接访问原始服务器时,例如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 header ?如何让 Cloudflare 转发 ETag?默认情况下,Cloudflare 不会缓存 GET http://example.com 请求,因为它是一个 HTML 页面。

最佳答案

我与 Cloudflare 技术支持工程师交谈,他帮助解决了我的问题。对于将来可能遇到同样问题的任何人,以下是解决问题的方法:

我为有问题的 URL 启用了电子邮件混淆(即删除其 ETag header )。根据https://support.cloudflare.com/hc/en-us/articles/218505467-Does-CloudFlare-support-ETag-headers- ,

Email Obfuscation will need to be disabled, otherwise the ETag headers
will be removed from the response. Email Obfuscation modifies the code
significantly enough it cannot be considered semantically equivalent.

不过,禁用电子邮件混淆仍然无法解决问题。原来我启用了一个可以修改 HTML 的应用程序,因此必须使 ETag 无效。最后,为该 URL 设置禁用安全性、禁用应用程序、禁用性能的页面规则就成功了。

关于http - Cloudflare 不转发 ETag header ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38034586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com