Re: Response Header IF statement problem

2018-02-14 Thread webopsx
Hi, Yes NGINX can inspect the header, See the following full example. It will check for the match of "true" case-insensitive. I am simulating your backend on port 81. Does this make sense? map $upstream_http_x_secured_page $nocache { ~*true "1"; default

Re: Response Header IF statement problem

2018-02-14 Thread webopsx
Hi, The map is processed on each request and should be very consistent. I thought you wanted to disable cache on the existence of a response header, not a request header. Otherwise I think we need more information to understand, such as how are you testing? Perhaps paste your full configuration

Re: Response Header IF statement problem

2018-02-14 Thread webopsx
You can use map for this... - http://nginx.org/en/docs/http/ngx_http_map_module.html#map map $upstream_http_x_secured_page $nocache { "search string" "1" default ""; } location /foo { ... proxy_no_cache $nocache; } Posted at Nginx Forum: https:/

Re: Response Header IF statement problem

2018-02-14 Thread webopsx
Hi, If I understand correctly you actually don't want to cache specific responses (not bypass). The proxy_cache_bypass is only for if the response has already been cached and defines the behavior in which NGINX should serve the cached version to a client. Therefore if I understand correctly, you