Setting custom response headers

Igor Sysoev is at rambler-co.ru
Wed Jun 3 17:44:09 MSD 2009


On Wed, Jun 03, 2009 at 09:28:06AM -0400, ehudros2 wrote:

> So there is no way I can calculate a time string in runtime unless I'm using expire?

You may try to use builtin perl:

http {
   perl_var  $user_exp
             'sub { return scalar (localtime(time() + 300 * 86400)) }';

   location ...

        add_header  User-Expires  $user_exp;


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list