Issue
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 any way to turn this off or any way to get around it?
The iframe has no src
attribute and the contents are set using:
frame.open();
frame.write(html);
frame.close();
Solution
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:
- Prepare your proxy server - install IIS, Apache
- Get valid SSL certificate to avoid security errors (free from startssl.com for example)
- Write a wrapper, which will download insecure content (how to below)
- From your site/app get https://yourproxy.com/?page=http://insecurepage.com
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
Answered By - panpernicek Answer Checked By - David Marino (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.