Cloudflare not forwarding ETag header?

I have a website (e.g. http://example.com ) that uses Cloudflare. Nothing special, no weird page rules, no weird settings, free plan.

When I go to http://example.com , I get this answer for 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 

Please note that the response does not have an ETag header, even if it is enabled on my source server.

When I go directly to the source server, for example, GET http://01.23.456.789/ , I get this answer:

 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 

Does anyone know why Cloudflare will not forward the ETag header? How can I get Cloudflare to forward ETag? Cloudflare does not cache the default GET request http://example.com , as this is an HTML page.

+5
source share
1 answer

I spoke with Cloudflare's technical support engineer and he helped fix my problem. For those who may have this same problem in the future, here is the fix:

I have the Email Obfuscation feature enabled for the URL in question (which led to the removal of the ETag header). According to 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. 

Disabling Email Obfuscation still did not fix. It turns out I had an application that would modify the HTML code, so the ETag had to be invalidated. In the end, setting a page rule with security disabled, disabling applications, disabling performance for this URL did the trick.

+10
source

All Articles