When you use the add_header directive in nginx, the header is added to the response coming from the origin server.
Say the origin server returns cache-control public, max-age=60. But in the nginx reverse proxy location you set something like:
add_header cache-control public, max-age=10
What does this do exactly? There are 2 different scenarios I can think of:
1) Nginx respects the cache-control header from the origin server and stores the content in its cache with an expiration of 60 secs. Then passes on the response with an overwritten header causing the client to store the resource in its cache with an expiration of 10s.
or..
2) Nginx overwrites the response headers first and then interprets them. It stores the resource with an expiration of 10 secs and passes the response to the client which also caches the it with an expiration of 10 secs.