Nginx: conditional "expires" directive

Oleksandr V. Typlyns'kyi wangsamp at gmail.com
Tue Aug 16 15:11:19 UTC 2011


Today Aug 16, 2011 at 08:25 somebi wrote:

> It seems that expires directive does not support varaibles.

  You can try Cache-Control header instead:

  server {
  ...
     set $ccontrol "max-age=3600";
     if($arg_no_cache) { set $ccontrol "no-cache";}
     add_header Cache-Control $ccontrol;
  ...
  }

-- 
WNGS-RIPE



More information about the nginx mailing list