Proxy HEAD requests


#1

According to the docs here, HEAD requests get converted to GET requests and cached. Can I explicitly look up HEAD requests and in case of a miss pass them to the backend as HEAD?

https://docs.fastly.com/guides/debugging/using-get-instead-of-head-for-command-line-caching-tests


#2

Hi Vlad-
If you capture the HEAD in vcl_recv and return(pass) it should work.

But otherwise, for a cacheable object we’re going to fetch the object.

–Peter


#3

Is it possible to cache the object though? I have modified the Fastly VCL boilerplate to do exactly that, but I would still like to cache the HEAD request according to the Cache-Control header returned in the response.


#4

Unfortunately not.

Sorry.

–Peter