【问题标题】:Mixed Content: Iframe converting https call to http and the request gets blocked混合内容:Iframe 将 https 调用转换为 http 并且请求被阻止
【发布时间】:2019-02-13 22:36:55
【问题描述】:

我们有一个网站,通过数字签名为医疗保健提供者提供转诊选项。我们正在升级我们的网站安全政策,以不重定向到第三方网站进行签名。我们不是重定向到第三方网站,而是尝试将第三方网站嵌入我们的网站以进行签名。

现在是技术问题:

我们正在使用 iFrame 嵌入第三方网站。对于需要在此 iFrame 中加载的每个签名,我们都有自定义第三方链接。

我们的网站使用 HTTPS,第三方网站也使用 HTTPS。

即使使用的第三方 URL 在 https 上,我们也会遇到错误

 **The page at 'https://mywebsite.com/' was loaded over HTTPS, but requested an insecure resource 'http://MyThirdPartyIntegratedWebsite' This request has been blocked; the content must be served over HTTPS**

为每个用户形成的 URL 是为他的签名定制的

$scope.detailFrame = 'https://MyThirdPartyIntegratedWebsite/userID=123'

也将第三方网站列入白名单。

$sceDelegateProvider.resourceUrlWhitelist([
    // Allow same origin resource loads.
    'self',
    // Allow loading from our assets domain.  Notice the difference between * and **.
    'https://MyThirdPartyIntegratedWebsite/**'

    ]);

如何避免iFrame不安全地调用第三方网站?

【问题讨论】:

  • 问:“如何避免iFrame不安全地调用第三方网站?”答:不能。如果如您所说,“我们正在尝试将第三方网站嵌入到我们的网站中以进行签名……我们正在使用 iFrame 嵌入第三方网站”,那么您无法控制第三方嵌入的资源 -派对网站尝试加载。因此,如果该第三方网站尝试加载不安全的 http 资源,您将无法避免。
  • 我了解无法控制内部重定向。就我而言,在初次通话之前,我收到了混合内容错误。它自己的初始请求被转换为 http 调用。

标签: iframe mixed-content insecure-connection


【解决方案1】:

实际上是来自第三方网站的内部重定向导致了问题。我们与他们打了电话来解决这个问题。谢谢sideshowba

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-04-23
    • 2020-12-19
    • 2017-06-11
    • 2020-10-18
    • 2015-12-04
    • 1970-01-01
    • 2015-12-17
    • 1970-01-01
    相关资源
    最近更新 更多