【问题标题】:No navigation in iframe with Angular 4 and Foundation 6使用 Angular 4 和 Foundation 6 在 iframe 中没有导航
【发布时间】:2017-09-27 14:20:45
【问题描述】:

我正在使用 iframe 在我的 Angular 项目中显示一些网站链接。

问题是无法在 iframe 内的目标网站上导航

这是显示 iframe 的代码:

 <button class="buttonhome" data-open="myModal">Biroute Clic sur ce bouton</button>
    <div class="large reveal" id="myModal" style="height: 85vh" data-reveal>
        <iframe width="100%" height="100%" src="https://www.digitick.com/cloakroom-invite-soiree-le-rex-club-paris-05-octobre-2017-css5-rexclub-pg101-ri4869965.html" frameborder="0" allowfullscreen></iframe>
        <button class="close-button" data-close aria-label="Close modal" type="button">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>

问题是网站显示在 iframe 中,但是当用户单击链接时无法在其中导航(它用于购买带有重定向的票)。当我尝试点击应该触发动作的东西时,什么也没有发生。

有什么想法吗?

编辑: 控制台浏览器错误:

cloakroom-invite-soiree-le-rex-club-paris-05-octobre-2017-css5-rexclub-
pg101-ri4869965.html:1 Mixed Content: The page at 
'https://yunofrontraf-biroute78.c9users.io/homepage' was loaded over 
HTTPS, but requested an insecure resource 'http://www.rexclub.com/'. 
This request has been blocked; the content must be served over HTTPS.

EDIT2:

编辑:我尝试使用另一个链接并且它有效,似乎我指向的网站不支持 https ..

这可以绕过吗?

【问题讨论】:

  • iframe 的 angular 有问题,你可以看看那里的文档
  • 浏览器控制台是否显示错误?
  • @ChristianBenseler 我更新了控制台错误。看起来像http和https之间的安全问题这很奇怪,因为在我的代码中它是一个https链接

标签: angular http iframe https


【解决方案1】:

所以,这与 Angular、Foundation 或其他无关。 问题是父母是从 https 和 iframr,http 服务的。你不能混合它,这叫做“混合活动内容”并且被浏览器阻止。 看看here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    • 2018-03-13
    • 1970-01-01
    • 2022-12-03
    相关资源
    最近更新 更多