Having problem with local weather challenge

Having problem with local weather challenge
0.0 0

#1

I have a problem with local weather challenge in description an API mentioned for https when I fetching to this API I face an error.

No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

I can fix this problem in my local by enabling Allow-Control-Allow-Origin: * by a chrome extension
but by enabling Allow-Control-Allow-Origin: * Codepen won’t open and will stay at loading. by disabling it my project output won’t show properly.


#2

It would help if you posted a link to the pen. The more specific the question, the easier it is to get a response.


#3

Try adding https://cors-anywhere.herokuapp.com/ before the URL like this:
https://cors-anywhere.herokuapp.com/http://your-api-url.com


#4

thank you It solve my problem


#5

OMG, Thank you. I’ve been hitting the wall with this. It’s working now.