Search code examples
.net.net-coremixed-content

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


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?


Solution

  • 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.