How to allow http content within an iframe on a https site

后端 未结 10 1313
我寻月下人不归
我寻月下人不归 2020-11-22 14:06

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_pagenam

10条回答
  •  遇见更好的自我
    2020-11-22 14:29

    You will always get warnings of blocked content in most browsers when trying to display non secure content on an https page. This is tricky if you want to embed stuff from other sites that aren't behind ssl. You can turn off the warnings or remove the blocking in your own browser but for other visitors it's a problem.

    One way to do it is to load the content server side 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.

提交回复
热议问题