In nginx is there a way to conditionally serve a file with different expires headers depending on when the file was last modified? For example, if
foo was modified within the last week then I want it to expire in a few hours, otherwise I want it to expire in a few days.
Browsers are probably already supposed to have the functionality you describe, so, there's really not that much point implementing it within nginx.
Standard nginx has the
I don't think any of the standard modules that are compiled by default into nginx can do what you request here — dynamic expires, with a varying offset depending on how long ago the file was modified.
However, there is an
Note that this