LemmingJoel
2008-Dec-09 00:50 UTC
asset_host with HTTPS problem, or possibly layout being cached?
I''m having some trouble with either the asset_host feature or possible something to do with layout caching. I have this in my environment/production.rb: ActionController::Base.asset_host = Proc.new do |source, request| if request.ssl? "https://#{request.host_with_port}" else "http://asset#{source.hash % 4}.mydominname.com" end end When I visit a page using HTTPS, some assets are pointing to a HTTPS url, and others to a HTTP url. It turns out the contents of the layout produces the HTTP urls, and the page action produces the HTTPS urls. Perhaps the layout is being cached?? I need all assets pointing to HTTPS urls when the page is requested using HTTPS, and likewise, I need all assets pointing to HTTP urls when the page is requested using HTTP. Any thoughts as to why this is happening? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---