For further actions, you may consider blocking this person and/or reporting abuse
Read next
How did we assemble and produce airplanes in Cabin Crew Life Simulator? Dev Log #1
Zuki HoKo -
Sealed Interfaces vs. Sealed Classes in Kotlin: When and Why to Use Each
Valerii Popov -
Understanding OpenAIโs ChatGPT History Policy: What It Means for Users
aditi gupta1633 -
Inertia.js with Laravel and React: A Guide for Entry-Level Developers ๐
Harold Defree -
Top comments (11)
thanks guys , i found that the problem is firefox is causing that problem cuz off security
I would use some caution with this. I develop using Firefox and I have never run into this problem just due to the browser. Usually this is a config item with the request or the API server. In this case my codepen rules out the API. Meaning this is a configuration issue with your code.
Even if the config item is only broken in Firefox you should fix it. Failure to do so will result in Firefox users not being able to use the resource you are building. Furthermore, leaving this issue will likely result in more bugs or instability in the future.
Try replacing
https://localhost:3000
withhttp://localhost:3000
(the 's' got removed) in your code.So this is a CORS error. Here is a link for more information. auth0.com/blog/cors-tutorial-a-gui...
But here is the GIST of it. CORS is a way that we protect our resources by limiting consumers of the resources to the same domain. Usually we see this error when you're writing a new API or connecting up to an API. Essentially, domain a hosting your site can't talk to domain b until the CORS policy is set correctly.
I can see that you are using a publicly available API. I'm not sure what is wrong with your code. But, I created a simple codepen to give you an idea on how it is meant to be consumed.
codepen.io/brentvdalling/pen/LYdKP...
yes with copen the code work but in localhost not
Hmm can you give us more info? Are you using node js?
What are you trying to do?
i am using react js
and what are you trying to do?
Are you connected to the internet?
yes of cours