Welcome! Log In Create A New Profile

Advanced

Re: Proxy cache passes GET instead of HEAD to upstream

Valentin V. Bartenev
February 14, 2014 05:24PM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy cache passes GET instead of HEAD to upstream

jove4015 February 14, 2014 05:11PM

Re: Proxy cache passes GET instead of HEAD to upstream

Valentin V. Bartenev February 14, 2014 05:24PM

Re: Proxy cache passes GET instead of HEAD to upstream

Maxim Dounin February 17, 2014 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 327
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready