0

I've a web site where i'm hosting a mysql database, a website and a webapi app (say: https://my-website.com/webapi). Then I've a WebGl app hosted on a CDN (says: https://www.mycdn.com/myapp)

After WebGl app is downloaded into user browser, user must login or register. Login check is made from webgl app to https://my-website.com/webapi .

I'm getting this error:

The page at .. page name ... was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint http://my-website.com/webapi.  This request has been blocked; the content must be served over HTTPS.

I can assure that in my C# Unity code i'm calling my web api via https.

What can be the error ?

gman
  • 100,619
  • 31
  • 269
  • 393
stighy
  • 7,260
  • 25
  • 97
  • 157
  • Well the URL is right there in the error message. Perhaps some of your code isn't doing what you think it is. – Pointy Apr 21 '19 at 15:09
  • "I can assure that in my C# Unity code i'm calling my web api via https." Did you check your javascript as well? XMLHttpRequest is a javascript object. – Anis R. Apr 21 '19 at 15:12
  • Maybe it can be a CORS error. If yes , how and where can I set CORS ? – stighy Apr 21 '19 at 15:16
  • 1
    It doesn't look like a CORS error. It looks like some code on the page is trying to make an XHR to an http URL. – Pointy Apr 21 '19 at 15:17

0 Answers0