How To Solve Any CORS Error

preview_player
Показать описание

In this video I go over how to solve CORS errors!

Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Tags:
- ReactJS Tutorial
- ReactJS and MySQL
- NodeJS Tutorial
- API Tutorial

#reactjs #coding
Рекомендации по теме
Комментарии
Автор

Hi, thank you for explaining this issue. But I have problem with fetching data from not my server. What I have to do in this case? 🙏

AlEgorova
Автор

Pedro, thank you for clarifying that CORS issues in the browser is always because of the server and not the client. This was something that always tripped me up but now it's clear that the backend needs to whitelist the front end domain. Never the other way around! Thumbs up

codingispower
Автор

But what about if we want to get the data from the external APIs and getting the cors error, in this case we don't have access to the backend of that api...how to fix this error?

ajaysankapal
Автор

I am getting this error whenever i try to fetch metro api, how i can fix it

Mobilemaniaplays
Автор

great, as a couple other commenters pointed out... what if the backend server is not in my control? Like i just want to call a public/external api?

derrickmcfall
Автор

This would have been released in the weekend because I spent sleepless nights on CORS error felt headache and tired. The canines of CORS have been broken. Thanks, @PerdoTech for this.

ishimweisaac
Автор

I have the same cors error caused - but the "backend" is DigitalOcean. I have no control over what headers DigitalOcean Spaces should include in response to PUT. Now what?

Автор

Even after using cors as middleware, the problem exists. Is there any more way?

freemusics
Автор

hey Pedro, I am so happy for you you are getting closer to 100k subs and it means that you worked hard to get there. Can you make a video teaching us how you can split your time between your work, making videos, and hanging out with your friends?

alasassi
Автор

Hi pedro can we resolve cors error using nodejs for external api which we dont have access to

AbhishekSingh-wrfc
Автор

Okay but mine returns 404. And still the same route returns results in postman

ogtuuih
Автор

I’ve been dealing with cors issues for a while. Thank you Pedro. Btw, are you Brazilian?

GuilhermeTeixeira
Автор

Hey Pedro, have you ever used nexus, a superset of graphql? What do you think of it? Do you like it more than typegraphql?

yasinnkhann
Автор

OMG, My error was u=just due to misplacement of the" app.use(cors()); "statement.
Pedro when you explained, i was thinking i have written the statement then what's the issue, and then God helped and i checked the placement of the statement.And it worked, I am soglad, as i was having some errors with the API and when copy pasted the code then this error came.

wardahshahid
Автор

Yo Pedro loving your react series, if you can maybe make a Todo app with React and firebase(so data is not lost on refresh) or a Chat app with firebase and React as well that would be great. Your tutorials are simply the best, been having trouble following others. Also if you can style just a little bit that would be nice. Alot of times people see the first few seconds and are thinking "Why would i want to build this this looks horrible" lol

eshw
Автор

I'm hoping to get some advice on your video series. I did a full stack mern bootcamp by trilogy last year and passed and got the certificate. but I feel like I didn't retain anything because I was overwhelmed and working full time. I want to become a react developer but i also feel like i should learn the mern stack because its what i learned during my bootcamp. I think I am a good beginner to intermediate coder and I have a lot of practice to do until I feel confident to start applying to jobs. Do you recommend I watch your react course or your full stack course and if I retain all the knowledge learned in those videos do you think I'll be ready to start applying? Thanks for all the work you do by the way.

RosasYo
Автор

Hello I dont know if you notice my comment, but thanks for the tutorials. do you plan to make an application on react, RTK , ts maybe tailwind ? thx a lot

haibova_irisha
Автор

i am unable to deploy my application through all provides

My app shows a blank page after deployment Can u please tell me the solution

avinashgunturu
Автор

Pedro my requests are being blocked by firebase storage. Cors issue. I passed my domain and all good. But what if Im on dev environment? Localhost? How do i specify that on firebase?

jennysquesttowellness
Автор

thank you Pedro!!! After your explanation I was able to solve mine. Great job man!!!🙂👍👍👍

elkhanhamet