我在尝试批准网页中的文档时出现以下错误
Mixed Content: The page at \'https://example.com\' was loaded over HTTPS, but requested an insecure resource \'http://insecure-page.com:9870/xyz\'. This request has been blocked; the content must be served over HTTPS.'
这是因为我的测试试图在安全页面上加载非安全页面。有人可以帮助绕过此错误,以便我可以继续我的自动化测试脚本中的其余步骤。我正在使用 Protractor-cucumber-javascript 框架
最佳答案
我遇到了同样的问题,我尝试了这种方法
<iframe [src]="your-https-original-domain?URL=your-http-url" width="100%" height="600"></iframe>
希望这会有所帮助。
引用:https://www.brokenbrowser.com/loading-insecure-content-in-secure-pages/
关于javascript - 如何绕过混合内容错误 (http/https),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52594270/