This is my nginx proxy_cache config:
proxy_cache cache_one;
location ~ \.(jpg|png|gif) {
proxy_cache_valid 1d;
}
It's worked but I never know the images expiration time in any way
I wanna add a header for expiration time like this:
location ~ \.(jpg|png|gif) {
proxy_cache_valid 1d;
add_header expires $proxy_cache_expires;
}
Is this possible? how can I get $proxy_cache_expires
?