Ok, so I did this and it worked and then it stopped working, then it worked again and then stopped working. I literally used the code below, the map appears right above my server {} block. When it worked I was passing a header with the $nocache value set and it was consistently returning the correct value. What I don’t understand is that I did not change the code that runs this, I made some other non related changes and then this stops working.
What would cause the map directive to stop working? Or maybe my question is what would cause the map directive to cache a value to that variable and then not change it even with nginx restarts?
___________________________________________
Michael Friscia
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile
http://web.yale.edu http://web.yale.edu/
On 2/14/18, 10:35 AM, "nginx on behalf of webopsx" <nginx-bounces@nginx.org on behalf of nginx-forum@forum.nginx.org> wrote:
You can use map for this...
- https://urldefense.proofpoint.com/v2/url?u=http-3A__nginx.org_en_docs_http_ngx-5Fhttp-5Fmap-5Fmodule.html-23map&d=DwICAg&c=cjytLXgP8ixuoHflwc-poQ&r=wvXEDjvtDPcv7AlldT5UvDx32KXBEM6um_lS023SJrs&m=csqe7S6wi1lA0kyhdVj1SfeveAOmZWbSQEv2optF3DM&s=T2K9F3KlskBzpELc7oj9imZ4p2BYuKpKw_5q-LFmuNI&e=
map $upstream_http_x_secured_page $nocache {
"search string" "1"
default "";
}
location /foo {
...
proxy_no_cache $nocache;
}
Posted at Nginx Forum: https://urldefense.proofpoint.com/v2/url?u=https-3A__forum.nginx.org_read.php-3F2-2C278558-2C278563-23msg-2D278563&d=DwICAg&c=cjytLXgP8ixuoHflwc-poQ&r=wvXEDjvtDPcv7AlldT5UvDx32KXBEM6um_lS023SJrs&m=csqe7S6wi1lA0kyhdVj1SfeveAOmZWbSQEv2optF3DM&s=165qUkBDlSIz9uoSMkUjKmbUovmlJdt3fBGdYfNEKcU&e=
_______________________________________________
nginx mailing list
nginx@nginx.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.nginx.org_mailman_listinfo_nginx&d=DwICAg&c=cjytLXgP8ixuoHflwc-poQ&r=wvXEDjvtDPcv7AlldT5UvDx32KXBEM6um_lS023SJrs&m=csqe7S6wi1lA0kyhdVj1SfeveAOmZWbSQEv2optF3DM&s=8K1QknyjZyQW-6l2izUg26ej0rKE49EN2u5NQ-vGEuI&e=
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx