0

I try to send a request to a public API that not host in https but it is hot in HTTP. Its all working good In localhost but when I deploy it to vercel production build in https url. it gives an error.

axios.get('http://api');

how to overcome this?

Bryan Lumbantobing
  • 368
  • 1
  • 4
  • 12

1 Answers1

0

its possible, but understand the risks, take a look at also search for "jsonp" or "cors" ajax the following answer is for jQuery but i believe if you allow in header it should work. Jquery AJAX: No 'Access-Control-Allow-Origin' header is present on the requested resource

Niel
  • 66
  • 6