February 14, 2018 04:04PM
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
Subject Author Posted

Response Header IF statement problem

wickedhangover February 14, 2018 09:12AM

Re: Response Header IF statement problem

Roman Arutyunyan February 14, 2018 10:02AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:04AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:08AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:04PM

Re: Response Header IF statement problem

webopsx February 14, 2018 04:39PM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:46PM

Re: Response Header IF statement problem

pbooth February 14, 2018 05:16PM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:04AM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:24AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 07:38AM

Re: Response Header IF statement problem

wickedhangover February 16, 2018 08:52AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 10:40AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:03AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:18AM

Re: Response Header IF statement problem

webopsx February 14, 2018 05:07PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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