I have nginx setup, acting as a reverse proxy to apache. However, I need to disable caching for gifs. How can I do this on nginx?
Thanks
This should do the trick:
set $no_cache "";
if ($request_uri ~* \.gif$) {
set $no_cache "1";
}
proxy_no_cache $no_cache;
proxy_cache_bypass $no_cache;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With