cache all endpoints but one: nginx settings

gg4u nginx-forum at
Mon Oct 10 19:14:33 UTC 2016

thank you Maxim, 
I ll try with your suggestions.
So basically, if I have a "production" server and a proxy server in front of
it, I just need cache on the proxy server
, and not cache responses on the production server?

I have this setting on production server:

                # Set Cache for my Json api
                location ~* \.(?:json)$ {
                  expires 1M;
                  access_log off;
                  add_header Cache-Control "public";

But if I am using a proxy server it is useless, correct?

Posted at Nginx Forum:,270058,270167#msg-270167

More information about the nginx mailing list