How to adjust Cache-Control for SSI-including entities

Jan Algermissen jan.algermissen at
Tue Jan 20 10:46:36 UTC 2015

On 19 Jan 2015, at 21:38, Francis Daly <francis at> wrote:

> On Mon, Jan 19, 2015 at 08:44:33PM +0100, Jan Algermissen wrote:
> Hi there,
>> upstream U1 produces the main page (the one containing SSI include directives) and wants nginx to cache its response (the page with the unresolved SSI include directives). Thus U1 sends the main page with Cache-Control: max-age=60.
>> In addition I of course want nginx to strip/adjust the Cache-Control / max-age when the assembled page is sent to the client.
> Completely untested, but, depending on how you connect to upstream, does
> "proxy_hide_header" or "proxy_ignore_headers" do what you want?

Do you have any idea, how I can then best re-add the header? The case came up that clients need an explicit Cache-Control: no-cache (to ensure reload of the page when hitting the back button …)


> 	f
> -- 
> Francis Daly        francis at
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list