I have a controller that serves up images from a different location
from /public/images/ by using send_file or send_data on /media/thumbs/
38 for example
In lighttpd I have:
expire.url = ( "/media/" => "access 10 years",
"/stylesheets/" => "access 10 years" ,
"/javascripts/" => "access 10 years",
"/images/" => "access 10 years" )
The correct expires value is being set for /stylesheets/, /
javascripts/ and /images/ but it is not being set for /media/.
Any idea as to how I might get either:
1) lighttpd to set the expires header
2) rails to set the expires header for send_data and send_file
Unless I am doing it completely wrong, in which case so pointers would
be useful.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On Sat, Mar 14, 2009 at 6:50 PM, Peter Hickman <peterhi-XZoyATsUNX5Wk0Htik3J/w@public.gmane.org> wrote:> > I have a controller that serves up images from a different location > from /public/images/ by using send_file or send_data on /media/thumbs/ > 38 for example > > In lighttpd I have: > > expire.url = ( "/media/" => "access 10 years", > "/stylesheets/" => "access 10 years" , > "/javascripts/" => "access 10 years", > "/images/" => "access 10 years" ) > > The correct expires value is being set for /stylesheets/, / > javascripts/ and /images/ but it is not being set for /media/. > > Any idea as to how I might get either: > 1) lighttpd to set the expires header > 2) rails to set the expires header for send_data and send_fileexpires_in 10.years There are nice screencasts on this subject at http://railslab.newrelic.com/ 1>> Unless I am doing it completely wrong, in which case so pointers would > be useful. > > Thanks. > > > > >-- Kaspars Bankovskis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, I will look into that Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---