What is CORS? Blocked by CORS policy error explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
cores is an acronym for cross-origin resource sharing and it helps keep the web safe by Guardian server resources from requests by unknown Origins like other web apps unless of course they have permission I can simulate this by issuing a fetch request in the dev console from the google.com domain and I'm fetching the mdn.com domain that's Crossing Origins and there we have a course policy error this error message can really confuse beginners though as it suggests possibly setting the request mode to no cores but this setting doesn't turn off cores for the server it just Alters the fetch request for example a request in no cores mode doesn't support Json data as a content type the server admin has to give you permission by setting their Access Control allow origin header to either let everyone access the resources or more commonly let an allowed list of domains have access it's kind of like having a VIP pass for resources and otherwise the course Dorman won't let you pass there's much more to learn about cores and I suggest starting on the mdn cores page
Info
Channel: Dave Gray
Views: 68,334
Rating: undefined out of 5
Keywords: what is cors, cors, blocked by cors, blocked by cors policy, cors error, no-cors, cors fetch, fetch cors, access-control-allow-origin, access-control-allow-origin *, cors policy react, cors policy error, cors js, cross origin resource sharing, cors explained, cors policy, cross origin policy, cors header access-control-allow-origin missing, how to fix cors error, cors javascript, cross origin request, access control allow origin, cors security, cors node, cors node.js, Js
Id: 1iOeoRCUD4M
Channel Id: undefined
Length: 1min 0sec (60 seconds)
Published: Sun Apr 16 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.