Proxy cache passes GET instead of HEAD to upstream
Valentin V. Bartenev
vbart at nginx.com
Fri Feb 14 22:23:26 UTC 2014
On Friday 14 February 2014 17:11:37 jove4015 wrote:
[..]
> Is there any way to set up the proxy to the upstream so that it proxies HEAD
> requests as HEAD requests, and GET requests as normal, and still caches
> responses as well? Ideally it would cache all GET responses, check against
> the cache for HEAD requests, and proxy HEAD requests for objects not in the
> cache as HEAD requests (thereby not caching the response, or only caching
> the HEAD response as a separate object - ideally the latter but I could live
> with the former).
>
You can set:
proxy_cache_methods GET;
in this case HEAD requests will bypass cache.
wbr, Valentin V. Bartenev
More information about the nginx
mailing list