How To Solve Any CORS Error

Поділитися
Вставка
  • Опубліковано 12 вер 2022
  • The first 1,000 people to use the link will get a 1 month free trial of Skillshare: skl.sh/pedrotech09221
    In this video I go over how to solve CORS errors!
    Join our Discord: / discord
    🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
    🐙 GraphQL Course: codedamn.com/learn/graphql-fo...
    ► Buy Crypto on Coinbase: coinbase-consumer.sjv.io/PedroTech
    Social
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Website: machadopedro.com
    Linkedin: / machadop1407
    Instagram: / _pedro.machado_
    Github: github.com/machadop1407
    Business Email: pedro@pedrotech.co
    Tags:
    - ReactJS Tutorial
    - ReactJS and MySQL
    - NodeJS Tutorial
    - API Tutorial
    #reactjs #coding
  • Наука та технологія

КОМЕНТАРІ • 69

  • @PedroTechnologies
    @PedroTechnologies  Рік тому +9

    The first 1,000 people to use the link will get a 1 month free trial of Skillshare: skl.sh/pedrotech09221

  • @codingispower1816
    @codingispower1816 Рік тому +1

    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

  • @elkhanhamet2561
    @elkhanhamet2561 Рік тому

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

  • @alasassi960
    @alasassi960 Рік тому +2

    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?

    • @PedroTechnologies
      @PedroTechnologies  Рік тому +2

      Thank you!! I can, my plan is to make a vid for my 100k special which is going to be a Q & A so i can answer questions like this one :)

    • @alasassi960
      @alasassi960 Рік тому

      @@PedroTechnologies Can't wait

  • @pamphilemkp5841
    @pamphilemkp5841 Рік тому

    Thank you for making things clear🎉, was very well explained

  • @dimitmoto1716
    @dimitmoto1716 Рік тому

    Thank you! Very usefull!

  • @rafael-ias
    @rafael-ias Рік тому +1

    100k de inscritos já! Parabéns pelo sucesso mano, continua que tu é bom

  • @jatilyadav4000
    @jatilyadav4000 Рік тому

    It helped me a lot .. Thank You soo much Sir...

  • @AlEgorova
    @AlEgorova Рік тому +4

    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? 🙏

  • @eshw23
    @eshw23 Рік тому +1

    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

  • @wardahshahid2758
    @wardahshahid2758 2 місяці тому

    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.

  • @DeepakJadiwal
    @DeepakJadiwal Рік тому

    Great content 👍

  • @Hakunamata786
    @Hakunamata786 Рік тому

    Had the same problem while implementing razorpay payment gateway. Has new for me that time

  • @ishimweisaac1019
    @ishimweisaac1019 Рік тому +1

    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.

    • @PedroTechnologies
      @PedroTechnologies  Рік тому +1

      Hahaha we have all been there! Glad you liked the vid :)

  • @yasinnkhann
    @yasinnkhann Рік тому

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

  • @AbhishekSingh-wr7fc
    @AbhishekSingh-wr7fc Рік тому +1

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

  • @rhiannonmonks6894
    @rhiannonmonks6894 Рік тому

    You are an angel!

  • @haibova_irisha
    @haibova_irisha Рік тому

    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 !!!!!!!!

  •  7 місяців тому

    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?

  • @mainakmukhrjee6328
    @mainakmukhrjee6328 Рік тому

    Hi sir, in my index.js I had already updated my origin and credentials is set true but yet when I am trying to send request from my react app , cors error is occuring . How can I fix that? A proxy server is blocking the MongoDB access so that is also a no go

  • @Mobilemaniaplays
    @Mobilemaniaplays Рік тому +1

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

  • @jennysquesttowellness
    @jennysquesttowellness Рік тому

    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?

  • @GuilhermeTeixeira
    @GuilhermeTeixeira Рік тому +1

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

  • @CreativeTutorialsWeb
    @CreativeTutorialsWeb Рік тому +1

    What an amazing tutor

  • @RosasYo
    @RosasYo Рік тому +1

    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.

    • @PedroTechnologies
      @PedroTechnologies  Рік тому +1

      Hey Jose, I would watch the react course first and then the full stack! After the react course you should be able to start applying. Don't forget you also need to learn Data Structures and Algorithms to pass interviews so I would recommend practicing that early :) GOOD LUCK!

    • @RosasYo
      @RosasYo Рік тому

      @@PedroTechnologies Thank you so much for your response!

  • @derrickmcfall8702
    @derrickmcfall8702 8 місяців тому +1

    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?

    • @naserNsoor
      @naserNsoor 6 місяців тому

      Need use to free api to practical or buy api subscription services then acssece data from scrite key api

  • @ajaysankapal3175
    @ajaysankapal3175 Рік тому +2

    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?

    • @derrickmcfall8702
      @derrickmcfall8702 8 місяців тому +1

      you ever find a solution to this? every video i can find is only in the case that its your own backend. not very helpful to me.

  • @thevasupodcast4561
    @thevasupodcast4561 Рік тому +1

    Make a video on how to get a react internship, please....

  • @avinashgunturu5198
    @avinashgunturu5198 Рік тому

    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

  • @hoangthiendo1909
    @hoangthiendo1909 Рік тому +2

    very informative 😁😁 thanks a lot

  • @theali7890
    @theali7890 Рік тому

    Cors errors are always so confusion. Most of the time you have no idea whether the backend is faulty or the frontend

  • @sherinc7998
    @sherinc7998 Рік тому

    Same error shows while using next js? How to use cors in next js?

  • @a7medabdulshafi887
    @a7medabdulshafi887 Рік тому

    Dear bedro, first many thanks for your great videos
    Second, I need your help i am working on a MERN stack project & I need you let me know how to handle submitting data from two different forms to same endpoint one to send individual data for a person other to send excel sheet.
    Only need to know how to handle routes and app.use

    • @munashe_dev
      @munashe_dev Рік тому

      Stoping using express bro use golang and GraphQL

  • @besspallysaikiran8647
    @besspallysaikiran8647 Рік тому

    so can you tell me about corb issue

  • @gui-wd1gg
    @gui-wd1gg Рік тому

    bora pedrooooooo

  • @johnychinese
    @johnychinese Рік тому +8

    Too late bro I needed this last month, it took me about 24 hours to solve it. But thanks anyway, it'll help a lot of people too

    • @PedroTechnologies
      @PedroTechnologies  Рік тому +5

      Hahaha you will run into this again, trust me! I hope peoiple can refer to this video everytime they get a cors error!

    • @CodeWithHaseeb
      @CodeWithHaseeb Рік тому

      Bro can u tell me how to fix this error

  • @abhishekmishra9841
    @abhishekmishra9841 Рік тому

    Bro for react ?

  • @user-og4tu6ui4h
    @user-og4tu6ui4h Місяць тому

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

  • @SelvamSelvam-qe3wf
    @SelvamSelvam-qe3wf 8 місяців тому

    Please help me for django

  • @abhishekmishra9841
    @abhishekmishra9841 Рік тому

    I think proxy write in package.json to slove ?

  • @ScriptyVijay
    @ScriptyVijay Рік тому

    So we can say that cors error come from backend.

  • @gabrieldib
    @gabrieldib Рік тому

    did not solve the Cors problem on my end

  • @ashanagur3761
    @ashanagur3761 Рік тому

    Hii can u help me

  • @lajoshufnagel6528
    @lajoshufnagel6528 4 місяці тому

    You are not solve my any cors error...

  • @Hakunamata786
    @Hakunamata786 Рік тому +1

    Hey pedro why have you painted your nails to black😂🤣

  • @sasipraveen5257
    @sasipraveen5257 Рік тому +1

    Cute Nails

  • @blackwood8816
    @blackwood8816 5 місяців тому

    this is not worked

  • @404statuscode
    @404statuscode Рік тому +1

    Yesterday I was struggling with this error🥲😂

    • @PedroTechnologies
      @PedroTechnologies  Рік тому +1

      Hahaha now you won't struggle anymore! Trust me, you will run into another cors error message :)

  • @Hakunamata786
    @Hakunamata786 Рік тому

    Hey pedro why have you painted your nails to black😂🤣