6

My page is on https but the API url I am calling in AJAX is on http. I am unable to get the AJAX response. Mixed Content: The page at 'https://localhost:8443/examples/demo.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.earthtools.org/timezone-1.1/40.71417/-74.00639?_=1431270529277'. This request has been blocked; the content must be served over HTTPS.

How can I resolve this?

The HTTPS version of API does not exist. How can I still call from my HTTPS enable page. I want my page to be HTTPS it is very important.

Any help?

Faizan
  • 1,847
  • 8
  • 40
  • 63

2 Answers2

0

I had a similar issue where I was on HTTP and had to call an API on HTTPS. For me disabling the Website tracking i.e. uncheck the Prevent cross-site tracking worked. enter image description here

Varun Sukheja
  • 6,170
  • 5
  • 51
  • 93
-1

I fixed it by using this chrome extension and then reloading my page. it works. https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

Other option is to turn on Proxy and then use it, https://chrome.google.com/webstore/detail/zenmate-security-privacy/fdcgdnkidjaadafnichfpabhfomcebme?hl=en

Faizan
  • 1,847
  • 8
  • 40
  • 63
  • this is so not appropriate. how do you suggest you implement this for production purposes not personal? – Jay Smoke Mar 20 '19 at 01:11