是否有一些解决方法可以用来避免混合内容错误? [英] Is there some workaround I can use to avoid mixed-content errors?

查看:21
本文介绍了是否有一些解决方法可以用来避免混合内容错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用 esri 服务/资源的 .Net 核心 Web 应用程序.该应用程序最终将托管在客户端的服务器上.我们在我们的服务器上托管了 esri 资源,在他们的服务器上托管了其他 esri 资源.无论出于何种原因,他们拒绝使用 SSL 而我们确实使用 SSL,所以我现在有一个

I am working on a .Net core web app which is using esri services /resources. The app will eventually be hosted on the client's server. We have esri resources hosted on our servers and other esri resources hosted on their servers. For whatever reason, they refuse to use SSL and we do use SSL so I now have an

混合内容:位于 https://app.smt.smt 的页面通过 HTTPS 加载,但请求和不安全的 XMLHttpRequest 端点.此请求已被阻止;内容必须通过 HTTPS 提供.

Mixed content: The page at https://app.smt.smt was loaded over HTTPS but requests and insecure XMLHttpRequest endpoint. This request has been blocked; the content must be served over HTTPS.

我尝试在他们的服务器上迁移我们的资源,他们拒绝了.我可以采取一些解决方法来避免这种混合内容错误吗?

I tried migrating our resources on their servers, they refused. Is there some workaround I can do to avoid this mixed content error?

推荐答案

仅靠前端代码无法解决混合内容阻塞问题.

There is no way just from your frontend code to work around mixed-content blocking.

唯一的选择是从后端代码而不是前端代码向 http 资源发出请求,或者创建某种代理,将资源暴露给前端代码https URL 而不是 http URL.

The only alternative is to make the requests to the http resources from your backend code rather than your frontend code, or else to create a proxy of some kind that exposes the resources to your frontend code at https URLs rather than http URLs.

这篇关于是否有一些解决方法可以用来避免混合内容错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆