Expires: modified +1d?

Is it possible to set the expires header based on the modified time of a
file? I know you can do this in lighttpd and apache, but I can’t find
any configuration examples for nginx.

Phillip B Oldham
The Activity People
[email protected] mailto:[email protected]


Policies

This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to
anyone.

This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.

On Thu, May 15, 2008 at 10:26:36AM +0100, Phillip B Oldham wrote:

Is it possible to set the expires header based on the modified time of a
file? I know you can do this in lighttpd and apache, but I can’t find
any configuration examples for nginx.

Try the attached patch.

It allows

expires modified +1d;

On Thu, May 15, 2008 at 03:23:20PM +0400, Igor S. wrote:

expires modified +1d;

The patch itself.

Works great, and thanks for the speedy response. Will this be added to
the trunk, or will I have to patch every time I compile?

Igor S. wrote:

Try the attached patch.

It allows

expires modified +1d;

The patch itself.

Phillip B Oldham
The Activity People
[email protected] mailto:[email protected]


Policies

This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to
anyone.

This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.

On Thu, May 15, 2008 at 03:42:04PM +0100, Phillip B Oldham wrote:

Works great, and thanks for the speedy response. Will this be added to
the trunk, or will I have to patch every time I compile?

I will add it in 0.7.0 next week.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs