Set Expires Header only if upstream has not already set an Expires

Thomas Glanzmann thomas at
Wed Nov 22 09:41:49 UTC 2017

I would like to add an Expires Header only to upstream content that has
not already set an Expires header. Is there an easy way to do that with

I thought about trying to add a header_filter_by_lua checking the
Expires header and set the necessary value if not already set. Is there
an easier way to do the same?


More information about the nginx mailing list