【问题标题】:Mixed Content: Call http content from API from https page混合内容:从 https 页面调用来自 API 的 http 内容
【发布时间】:2015-07-21 02:15:22
【问题描述】:

我的页面在 https 上,但我在 AJAX 中调用的 API url 在 http 上。 我无法获得 AJAX 响应。 混合内容:“https://localhost:8443/examples/demo.html”处的页面通过 HTTPS 加载,但请求了不安全的 XMLHttpRequest 端点“http://www.earthtools.org/timezone-1.1/40.71417/-74.00639?_=1431270529277”。此请求已被阻止;内容必须通过 HTTPS 提供。

我该如何解决这个问题?

HTTPS 版本的 API 不存在。我怎样才能仍然从我的 HTTPS 启用页面调用。我希望我的页面是 HTTPS,这非常重要。

有什么帮助吗?

【问题讨论】:

    标签: ajax api http https mixed-content


    【解决方案1】:

    我在使用 HTTP 时遇到了类似的问题,并且必须在 HTTPS 上调用 API。 对我来说,禁用网站跟踪,即取消选中 Prevent cross-site tracking 工作。

    【讨论】:

      【解决方案2】:

      我通过使用这个 chrome 扩展来修复它,然后重新加载我的页面。有用。 https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

      其他选项是打开代理然后使用它, https://chrome.google.com/webstore/detail/zenmate-security-privacy/fdcgdnkidjaadafnichfpabhfomcebme?hl=en

      【讨论】:

      • 这太不合适了。您如何建议您将其用于生产目的而非个人目的?
      猜你喜欢
      • 1970-01-01
      • 2021-02-08
      • 2016-04-16
      • 2020-08-18
      • 1970-01-01
      • 2016-09-04
      • 2015-08-13
      • 2021-08-03
      相关资源
      最近更新 更多