Hi Akshay, I learned a lot from this video. However I have a small correction to point out. At 06:50 you have written it as `accept-control-allow-origin: * ` while it is `access-control-allow-origin: *`. Extremely sorry for pointing out but some other beginner may capture it wrongly. Kindly put a patch message on screen while that portion is playing.
Wow it took me like more than a minute to find the difference between the two section. Certainly would have taken me a lot of time finding the solution. Thank you
"Thank you, my friend, for providing such a straightforward and simplified explanation of how CORS works. Your explanation has helped me understand this topic better. Great job!"
This is the reason why every developer is the fan and in love with you, you teach the things in the way they are to be delivered to the consumers/audience.. I want to mention this to, before whenever I used to watch content of any other youtuber it was quite obvious that I yawned for 2-3 times, but here whenever I watch your videos I never do that (or it wont come also), instead at this time I was very sleepy, but before going to sleep I just want to clear out this topic and now here I'm ready to move to you another video with full energy. Thanks bhaiya for making such a wonderful content..😍😍
ok this is the first time someone actually explained what CORS is instead of just giving 10 different ways to get rid of the error, just a header ! lol
Recently (two days back😁) I had my Full-stack Interview and they asked me about the middlewares😅 (Which I explained Using the example of Cors :) but that time I have only a little knowledge about cors (The interview went well but this question really scratch my head) And now after this, I can explain cors easily thanks to you sir😁🔥
Thank you so much sir. I was searching for the same in few months back, Today randomaly i watched your video and get to know that why my react app was not able to fetch data from API when i run it on another server like 3001. Thanks you so much sir for sharing your Efforts and knowledge. Love ❤️ and Support.
Hey Akshay, thanks a lot for uploading such informative videos. Could you please upload tutorials on JS Engine and how Web APIs, Callback Queues, Event loop works together with JS Engine to run JS on browser
Hi Akshay, thanks for your extremely helpful videos. Would request you to please help to understand the concept of microservices and how a JavaScript based app fits into this
It would be helpfull if you can practically demonstrated this concept like your other videos you always start with your screen sharing. Please can you make other video with ref to this by showing on same localhsot with diff ports communicating with and without CORS compliances of header supported , it would be grate help to all of us if you can do this.
Hey Akshay, Can you create Micro frontend learning video , it would be great to all developer for learning and also this concepts running in current market. Thanks in Advance
In beginning about 2 months ago I thought your videos are not of work! And 2 months later, here is me finding these very important and I have already seen most of your upload😂😂; Thank you Saini sir ❤️🦄🦄🦄🦄;
10:35 I have just learned about CORS recently and I have a question about by-passing CORS security mechanism. As I understand; the CORS configurations are made at the server side to handle cross origin resources access/sharing. So, does it even make sense to have a browser plugin or to start the browser with specific flags to by-pass CORS?
Yes even I have the same doubt... If we start our browser with '--disable-web-security ' flag, the browser does not send the preflight request and neither does it validate CORS headers, then how does the server still send back response to the browser?
hi ,your explanation is good and you mentioned something like CORS is not error and we make some mistake some thing kind of thing. can you explain more on that, what is mistake from our end if CROS policy not enabled at server end in which we don't have any control over it(i.e Third party API). 2) If don't have access or control over server side to make changes, how to Handel this error at client side??
Good video, but the technical details were not conveyed properly. But yes, it does set up some pretext post which one definitely has to go through some online documents.
Hi akshay, excellent teaching. Lots of thanks but i have a question. 1.When we direct api url hit in browser url adress then how it works? 2.when we call using fetch then how it will work?
Hi Akshay, I really liked the video. There's a correction in the video where you've shown the example of preflight request require before the POST request. But POST is listed as a method that doesn't require preflights in CORS. It's DELETE, HEAD, PUT which generally requires preflight request.
Akshay bro can u pls create a series such that we can follow in sequence from beginner to advanced js and in bw those vedio interview q discussed as per that topic. Many people wanna learn core js from u and in sequence bro step by step . Automatic you will cover topic as asked intrvw
I am having an issue with my django and react app sending options request but then not being able to send the post... it succesfully sends the OPTIONS with 200 code, then the post + Preflight doesnt work....
I watched some MERN app tutorials using cors() middleware on express server side to allow reaact app to hit express api routes, Is that bypassing and compromising the security somehow? Because server side doesnot have app any specific port info(for local development) as to which origin to allow and which not 🤔
Nice Demo, But In my case I am only allowed to permit specific Origins so I can use the way of "Multiple origins" but my "Multiple origins" are not in my hand.. it is coming from a database table.. so How Can I use it ???
Thanks for the video Akshay! But can you have the light source directed at the white board and not at the top? its difficult to see the content written with the overhead lights.
Hello sir , we using cors so that if anyone hit the api .he should be authorised first. So i wanted to uses headers of this cors request becoz in our case login and api hitting functionality is different? Please reply soon 😩😩
What if I don't what to access or change any data just want to click a button on website A which then clicks or simulate a click on website B and execute a function, does this falls under CORS ? If not any suggestion on how this can be done?
Thank you for the details, But I am getting {has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.} this cors error , Any idea about this ?
Try to use any concept you learn in some project. Or at least try to write the code yourself once and tweak few things and explore how it works. Also read about the scenarios where that can be helpful.
I am a junior frontend developer. I have an issue with the cors as u mentioned in the last part of the video . They asked me to resolve it by having a chrome extension called CORS UNBLOCK , But then again i can't able to bypass the error . So my question is there any possibility that the error will not be resolved after having the extention?
Hi Akshay, I learned a lot from this video. However I have a small correction to point out. At 06:50 you have written it as `accept-control-allow-origin: * ` while it is `access-control-allow-origin: *`. Extremely sorry for pointing out but some other beginner may capture it wrongly. Kindly put a patch message on screen while that portion is playing.
@@shankarnarayanb thanks alot for bro
Thanks Vikram for pointing out. It really helped to make out the difference
Wow it took me like more than a minute to find the difference between the two section. Certainly would have taken me a lot of time finding the solution.
Thank you
Bhai tune jo bataya na jis way m, jaise explain kiya man gaya teko aajtk smjhi nahi thi ye concept etni achese thank you man
"Thank you, my friend, for providing such a straightforward and simplified explanation of how CORS works. Your explanation has helped me understand this topic better. Great job!"
This is the reason why every developer is the fan and in love with you, you teach the things in the way they are to be delivered to the consumers/audience..
I want to mention this to, before whenever I used to watch content of any other youtuber it was quite obvious that I yawned for 2-3 times, but here whenever I watch your videos I never do that (or it wont come also), instead at this time I was very sleepy, but before going to sleep I just want to clear out this topic and now here I'm ready to move to you another video with full energy.
Thanks bhaiya for making such a wonderful content..😍😍
ok this is the first time someone actually explained what CORS is instead of just giving 10 different ways to get rid of the error, just a header ! lol
No other video could explain CORS soo briefly and easily. Thankyou Akshay♥️♥️
Undoubtedly
Finally, I understand how CORS works. This was awesome. Got to learn a lot.
Your series is nothing but AMAZING!
Recently (two days back😁) I had my Full-stack Interview and they asked me about the middlewares😅 (Which I explained Using the example of Cors :) but that time I have only a little knowledge about cors (The interview went well but this question really scratch my head) And now after this, I can explain cors easily thanks to you sir😁🔥
Apart from detailed content, I admire your effort for including commonly asked interview questions.
Thanks a lot. I have learned a lot form your videos explanation today I am having a big interview coming up today thanks a lot for the video again
All the very best @Saurabh. May be code be with you! 👍🏾
Thanks a lot Akshay, I was stuck at my project due to this, and your video resolved the issue. Doing great work bro. 😇
Thank you so much sir. I was searching for the same in few months back, Today randomaly i watched your video and get to know that why my react app was not able to fetch data from API when i run it on another server like 3001. Thanks you so much sir for sharing your Efforts and knowledge. Love ❤️ and Support.
isn't fetch or axios. get is not enough to fetch data from api??
Amazing work. I like the idea of explaining to whiteboard, really helped me understand the logic behind cors, this is what great teachers do.
Impressive, you won our hearts. Straight to the point
Now i completely understood what cors is
Thank you
the way you explain cors is outstanding really loved it
This is what I was looking for!! Excellent video.
Very explicit and right to the point explanation!
only a legend can explain legendary concepts
Best explanation in the market
Thanks @Akshay this video is so useful for not only a developer but Pentester like us.
Thanks Akshay for sharing beautiful explanation about CORS. Its really most frequently asked questions in interview.
Nice video showing what is going on under the hood. Personally, there was no live example showed in code, browser etc
Great explanation but there was a mistake in the video.
the response header is access-control-allow-origin and not accept-control-allow-origin.
Please make a video on web workers and service workers. I find it hard to understand. Your videos are very informative..Thanks a lot for sharing them.
So cool! , I'd love it if some images could pop as you speak to explain, than plain talking, it'll look interactive
good explanation about CORS. it is very useful
Wow awesome bro clear explanation love you !.....
The image which you shared API request to data response from server is super....
Just about time Akshay! I have an interview tomorrow ... Hope it will help :) Thanks
Wish you all the best, may the force be with you.
Did you make it?
Amazing video sir, very easy to understand.
Hmm, got it. However, was expecting more details with example, like other videos in the interview series.
Hi Akshay ur way of explaining is 🔥, If u reading this then pls make a video on closure beleive me you will get blessings of many developers like me
came here while learning namaste React🙏
Hey Akshay, thanks a lot for uploading such informative videos. Could you please upload tutorials on JS Engine and how Web APIs, Callback Queues, Event loop works together with JS Engine to run JS on browser
Special thanks for this video 🤟💯💯
Hi Akshay, thanks for your extremely helpful videos. Would request you to please help to understand the concept of microservices and how a JavaScript based app fits into this
Very nicely explained bro
Beautiful video. Great job! Easy to understand.
Thank you for the wonderful knowledge.
How to resolve the cors error
Excellent. Understood the concept. Thanks.
Really nice tutorial for CORS ...
It would be helpfull if you can practically demonstrated this concept like your other videos you always start with your screen sharing. Please can you make other video with ref to this by showing on same localhsot with diff ports communicating with and without CORS compliances of header supported , it would be grate help to all of us if you can do this.
Hi Akshay,
as always, i learn something new from your video. Please create video on micro services as well
Thanks
Thumbs up for the example pic at 1:23
Thanks Akshay :) This really helped in my understanding of CORS concept and resolving most request calls issue while developing projects :)
Thanks a lot! Great video bhaiya
Thanks man....this helped me a lot.
thanks for this video...i learned alot
Somehow he managed to clear the interview ,that doesn't mean anyone can clear the interview by following these videos
Hey Akshay, Can you create Micro frontend learning video , it would be great to all developer for learning and also this concepts running in current market. Thanks in Advance
What a gem!
Thank you sir.
These are a great set of videos! Keep up the good work :)
In beginning about 2 months ago I thought your videos are not of work!
And 2 months later, here is me finding these very important and I have already seen most of your upload😂😂;
Thank you Saini sir ❤️🦄🦄🦄🦄;
Nice explanation one query How browser decide to make a pre-flight request what are these steps?
10:35 I have just learned about CORS recently and I have a question about by-passing CORS security mechanism. As I understand; the CORS configurations are made at the server side to handle cross origin resources access/sharing. So, does it even make sense to have a browser plugin or to start the browser with specific flags to by-pass CORS?
Yes even I have the same doubt... If we start our browser with '--disable-web-security ' flag, the browser does not send the preflight request and neither does it validate CORS headers, then how does the server still send back response to the browser?
Please make series on microservices nowdays it is very popular not a good content avilable at youtube except you
Your material is awesome maan.
Very nice explained
Thank you Akshay...this is really helpful 👍
Perfect Video! thanks a lot for such a nice and detailed explanation about CORS :)
Very useul resource ! Thank you
Thanks! Forever thankful!
Thankyou so much for this video
hi ,your explanation is good and you mentioned something like CORS is not error and we make some mistake some thing kind of thing. can you explain more on that, what is mistake from our end if CROS policy not enabled at server end in which we don't have any control over it(i.e Third party API).
2) If don't have access or control over server side to make changes, how to Handel this error at client side??
Good video, but the technical details were not conveyed properly. But yes, it does set up some pretext post which one definitely has to go through some online documents.
please do more videos on js. Thanks
Hi akshay, excellent teaching. Lots of thanks but i have a question. 1.When we direct api url hit in browser url adress then how it works? 2.when we call using fetch then how it will work?
awesome yaar... well explained!!
Nice explaination
hi Akshay, very well explained, but could you pl suggest what we can handle OPTIONS method timedout case just before POST? Thank you in advance!
Great explanation
@8:53 "So the answer is no"
BLEEEP
Hi Akshay, I really liked the video. There's a correction in the video where you've shown the example of preflight request require before the POST request. But POST is listed as a method that doesn't require preflights in CORS. It's DELETE, HEAD, PUT which generally requires preflight request.
It requires if data has some type that is not application/x-www-form-urlencoded || multipart/form-data || text/plain
Akshay bro can u pls create a series such that we can follow in sequence from beginner to advanced js and in bw those vedio interview q discussed as per that topic. Many people wanna learn core js from u and in sequence bro step by step . Automatic you will cover topic as asked intrvw
awesome brother really nicely you explain.
Akshay Saini's voice is very similar to Akshay Kumar
😂
Aren't front end and back end of a web application hosted on different domains? How does that not cause CORS issue?
Coming here after 1st Namaste React webseries 🤩
The video is on point.
very helpful video
Awesome video Akshay !! you rock
Options request is still showing in firefox , even if it has removed from Access-Control-Allow-methods
I am having an issue with my django and react app sending options request but then not being able to send the post... it succesfully sends the OPTIONS with 200 code, then the post + Preflight doesnt work....
Great Video Sir
I watched some MERN app tutorials using cors() middleware on express server side to allow reaact app to hit express api routes, Is that bypassing and compromising the security somehow? Because server side doesnot have app any specific port info(for local development) as to which origin to allow and which not 🤔
Thanks for the session, it was helpful. Can you make a session on csrf token. It would be helpful.
Nice Demo,
But In my case I am only allowed to permit specific Origins so I can use the way of "Multiple origins"
but my "Multiple origins" are not in my hand.. it is coming from a database table.. so How Can I use it ???
great work👏
I didn't get the part where you said preflight calls are made to check if the request is valid/safe. I mean in what sense it should be safe/valid?
Thanks for the video Akshay! But can you have the light source directed at the white board and not at the top? its difficult to see the content written with the overhead lights.
Hello sir , we using cors so that if anyone hit the api .he should be authorised first. So i wanted to uses headers of this cors request becoz in our case login and api hitting functionality is different? Please reply soon 😩😩
Thanks for sharing.
What if I don't what to access or change any data just want to click a button on website A which then clicks or simulate a click on website B and execute a function, does this falls under CORS ?
If not any suggestion on how this can be done?
I love the expression in your eyes :x
thanks for this video
Thank you for the details, But I am getting {has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.} this cors error , Any idea about this ?
Please tell me some good resources (books, course, tutorial) to get in and out of vanilla JavaScript like your way of learning JavaScript.
Thanks
Just read The JavaScript Ninja by John Resig(jQuery creator)
I like, YDKJS. But you can go with any resource you want to, just make sure you practice things after reading. That's the key ;)
@@akshaymarch7 practice how? Please explain.Sorry if borthering you much
Try to use any concept you learn in some project. Or at least try to write the code yourself once and tweak few things and explore how it works. Also read about the scenarios where that can be helpful.
I am a junior frontend developer. I have an issue with the cors as u mentioned in the last part of the video . They asked me to resolve it by having a chrome extension called CORS UNBLOCK , But then again i can't able to bypass the error .
So my question is there any possibility that the error will not be resolved after having the extention?
Can you please tell us what is the criteria on which the server validates the preflight call, I mean how the server decides whether to allow a request