SWF_FU gem gives warning on HTTPS
SWF_FU gem gives warning on HTTPS
OK, you got this fancy gem integrated into your project to show all sort of video content and as you are nearing the launch you moved to HTTPS. Everything worked fine but HTTPS gives this warning that “Non-secure content is served from HTTPS” and you are clueless how to fix this problem.
Please read Marc’s comment below about the fix in 2.0.4!!
First the cause:
It is because there is an image “get_flash_player.gif” that this gem internally adds so that users can click on that link to upgrade/install Flash Player. As this image is coming from an HTTP URL instead of HTTPS, you are seeing this problem.
Now the solution:
Go to https://github.com/marcandre/swf_fu/blob/master/app/models/swf_fu/generator.rb
You would notice that at line # 10 it is giving image src with HTTP. This is what is causing this issue.
Now you can fix this problem by,
- Providing alt parameter with an HTTPS image URL OR
- You can change the gem file and change the http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif to https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif
Restart the server and reload the page. You would notice that annoying security warning is gone now.