Welcome! Log In Create A New Profile

Advanced

Re: Proxy cache passes GET instead of HEAD to upstream

Maxim Dounin
February 17, 2014 08:46AM
Hello!

On Sat, Feb 15, 2014 at 02:23:26AM +0400, Valentin V. Bartenev wrote:

> 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.

No, this won't work. HEAD and GET requests are always added to
the proxy_cache_methods mask.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
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: 215
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