Having problem with local weather challenge

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.

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

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

1 Like

thank you It solve my problem

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