I load some HTML into an iframe but when a file referenced is using http, not https, I get the following error:
[blocked] The page at {current_pagename} ran insecure content from {referenced_filename}
Is there anyway to turn this off or any way to get around it?
The iframe has no
src attribute and the contents are set using:
| |||||||||||||
|
33
+100
|
The best solution I created is to simply use google as the ssl proxy...
Tested and works in firefox.
Other Methods:
Unless you can get the http site owner to create an ssl certificate, the most secure and permanent solution would be to create an RSS feed grabing the content you need (presumably you are not actually 'doing' anything on the http site -that is to say not logging in to any system).
The real issue is that having http elements inside a https site represents a security issue. There are no completely kosher ways around this security risk so the above are just current work arounds.
Note, that you can disable this security measure in most browsers (yourself, not for others). Also note that these 'hacks' may become obsolete over time.
| ||||||||||||||||||||
|
5
|
Based on generality of this question, I think, that you'll need to setup your own HTTPS proxy on some server online. Do the following steps:
If you simply download remote site content via file_get_contents or similiar, you can still have insecure links to content. You'll have to find them with regex and also replace. Images are hard to solve, but Ï found workaround here: http://foundationphp.com/tutorials/image_proxy.php
| ||
2
|
You will always get warnings of blocked content in most browser when trying to display non secure content on an https page. This is tricky if you want to embed stuff from other sites that is'nt behind ssl. You can turn the warnings or the blockings of in your browser but for other visitors its a problem.
One way to do it is load the content serverside and save the images and other things to your server and display them from https.
You can also try using a service like embed.ly and get the content through them. They have support for getting the content behind https.
| ||||
|
1
|
I know this is an old post, but another solution would be to use cURL, for example:
redirect.php:
then in your iframe tag, something like:
This is just a MINIMAL example to illustrate the idea -- it doesn't sanitize the URL, nor would it prevent someone else using the redirect.php for their own purposes. Consider these things in the context of your own site.
The upside, though, is it's more flexible. For example, you could add some validation of the curl'd $data to make sure it's really what you want before displaying it -- for example, test to make sure it's not a 404, and have alternate content of your own ready if it is.
Plus -- I'm a little weary of relying on Javascript redirects for anything important.
Cheers!
| ||
0
|
You could try scraping whatever you need with PHP or another server side language, then put the iframe to the scraped content. Here's an example with PHP:
scrapedcontent.php:
index.html:
| ||||||||||||
|
0
|
If it's about a few and rarely changing URLs to embed into the
iframe , you could set up a SSL proxy for this on your own server and configure it so that one https URL on your server maps to one http URL on the proxy.
For example, I would look into ngrok and mitmproxy for this, since they are small and simple to configure (though usually meant for slightly different purposes).
http://stackoverflow.com/questions/18327314/how-to-allow-http-content-within-an-iframe-on-a-https-site
|