Is there some workaround I can use to avoid mixed-content errors?

眉间皱痕 提交于 2021-02-05 08:50:07

问题


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

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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/62755017/is-there-some-workaround-i-can-use-to-avoid-mixed-content-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!