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

后端 未结 10 1564
我寻月下人不归
我寻月下人不归 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条回答
  •  猫巷女王i
    2020-11-22 14:29

    Use your own HTTPS-to-HTTP reverse proxy.

    If your use case is about a few, rarely changing URLs to embed into the iframe, you can simply set up a reverse 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 proxied server. Since a reverse proxy is fully serverside, the browser cannot discover that it is "only" talking to a proxy of the real website, and thus will not complain as the connection to the proxy uses SSL properly.

    If for example you use Apache2 as your webserver, then see these instructions to create a reverse proxy.

提交回复
热议问题