Forum: Ruby on Rails image_tag + ssl

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joe Van D. (Guest)
on 2006-05-03 21:06
(Received via mailing list)
Hi,

If request.env["HTTPS"] == "on", shouldn't image_tag generate image
URLS that use HTTPS?

Joe
Jeroen H. (Guest)
on 2006-05-03 21:06
(Received via mailing list)
Joe Van D. wrote:
> Hi,
>
> If request.env["HTTPS"] == "on", shouldn't image_tag generate image
> URLS that use HTTPS?
>

If it's not a complete URL I don't think it's necessary.

e.g. if the page URL is https://www.exmaple.com and there's a <img
src="/public/images/mygif.gif" /> the gif will automatically get loaded
over HTTPS IIRC.

Try right clicking the image and select "view image" or whatever it's
called in your browser.

Jeroen
This topic is locked and can not be replied to.