Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache only if custom header is set by upstream

May 15, 2012 12:24PM
Yeah! Thanks, maybe you should add to the wiki, that "if" is executed before proxy_pass ;-)

Anyways, thank you very much for this helpful answer, it works this way.

obviously the map has to be the other way around, so if anyone finds this.. the correct way for caching only if upstream sets a custom header is:

map $upstream_http_myheader $nocache {
default 1;
1 0;
}

proxy_no_cache $nocache;
Subject Author Posted

proxy_cache only if custom header is set by upstream

ThomasLohner May 15, 2012 11:42AM

Re: proxy_cache only if custom header is set by upstream

Maxim Dounin May 15, 2012 11:52AM

Re: proxy_cache only if custom header is set by upstream

Valentin V. Bartenev May 15, 2012 12:00PM

Re: proxy_cache only if custom header is set by upstream

ThomasLohner May 15, 2012 12:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
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