Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to solve This request has been blocked; the content must be served over HTTPS

how should I make this called to avoid blocking request?

const getLocation = async () => {

   const LOCATION_URL = 'http://ip-api.com/json/?fields=country,city,lat,lon,timezone';

   const response = await axios.get(LOCATION_URL);
   return response.data;
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Website secured by ssl (https) can only access resources that are also secured with ssl

Checking the documentation reveals that:

256-bit SSL encryption is not available for this free API. Please see our pro service.
screenshot

You have a few options now:

  1. Buy premium
  2. Use different API provider
  3. Create a backend proxy that will fetch the data and send it to you
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading