ostark / upper

Integrates Edge Caches like Fastly, KeyCDN, Cloudflare and Varnish with Craft.
MIT License
102 stars 22 forks source link

Should HEAD responses get X-cache-tags headers too? #58

Open RedLucas opened 2 years ago

RedLucas commented 2 years ago

Since bots often use HEADs to check for content updates or if the server is alive, it makes sense to cache HEADs via CDN.

With this same reasoning, I think the upper process should attach the cache headers to both GETs and HEADs.

ostark commented 2 years ago

Hi Lucas,

I missed this! I'll do some research on this topic.

RedLucas commented 2 years ago

Hey, I appreciate it!

I worked around this issue on my end by serving HEAD requests like GET within CF. (which is technically ok but really not ideal).

but yeah, I was having issues with HEAD requests being uncached, which ends up akin to being DDoSed by web crawlers... Figured I'd bring it up here. :)