https iframe nested http page

Today I encountered a new demand. Our company's protocol is https. To display an http page (this page must be displayed), I did not pay attention to this problem at first. Isn't it simple for an iframe? Just nest it in.

The problem really starts here

It works perfectly locally, and it's done. Package and upload to the test environment. Boom, blank page.
My mind is blank.
Is it necessary to dynamically set the width and height, which is useless after setting.
Insert picture description here
Baidu, find a solution.
See this information
page-iframe-status

http-http-allowed
http-https-allowed
https- http-not allowed https Nested http does not support
https- https-allowed
https-https-insecure scripts-not allowed
https-https-inscure images-allowed but the browser will warn
Baidu Many articles basically don’t have a solution, saying that https can’t use iframe to nest http pages.
One of these solutions I didn’t try.
I simply set up an Apache server and configured it as https, specify a subdomain, and then use Apache. Proxy, proxy https to http url. (Of course, the prerequisite is that your server is not Apache, if it is Apache, it is simple). Note here that the Apache we started separately has nothing to do with our original server, and Apache is only used to handle http. (I had a misunderstanding before, it is possible to set Apache in front of my server, but there may be loopholes, or parallel processing is more scientific);
if someone tries this method, I hope to tell me whether it is possible or not. I can’t try for this reason, but this method should work.
We chose another method. Configure nginx proxy. It is enough to proxy an https into their http

Guess you like

Origin blog.csdn.net/lbchenxy/article/details/102620310